1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Leni [432]
3 years ago
12

Write a program that uses while loops to perform the following steps: Step a: Prompt the user to input two integers: firstNum an

d secondNum (firstNum must be less than secondNum). Step b: Output all odd numbers between firstNum and secondNum. Step c: Output the sum of all even numbers between firstNum and secondNum. Step d: Output the numbers and their squares between 1 and 10. Step e: Output the sum of the square of the odd numbers between firstNum and secondNum. Step f: Output all uppercase letters.
Engineering
1 answer:
Elodia [21]3 years ago
8 0

Answer:

#include<iostream>  

using namespace std;  

int main()

{

    int i, sum = 0, sqSum = 0, firstNum = 1, secondNum = 0;

    char ch;

    while (!(firstNum < secondNum))

    {

         cout << "Enter starting number: ";

         cin >> firstNum;

    cout<<"Enter ending number(must be > startingNumber): ";

         cin >> secondNum;

    }

    i = firstNum;

    cout << "The odd numbers between " << firstNum

         << " and " << secondNum << " are:\n";

    while (i <= secondNum)

    {

         if (i % 2 == 0)

             sum = sum + i;

         else

         {

             cout << i << " ";

             sqSum = sqSum + i * i;

         }

         i++;

    }

    cout << "\n\nThe sum of the even numbers is:"

         << sum << endl << endl;

    cout << "The sum of squares the odd numbers is:"

         << sqSum << endl;

    i = 1;

    cout << "\nNumber Square\n";

    while (i <= 10)

    {

         cout << " " << i << "\t " << i * i << endl;

         i++;

    }

    system("pause");

    return 0;

}

You might be interested in
Who developed the process of blueprinting?
VikaD [51]
Answer: C.) John Herschel
3 0
3 years ago
You hang a heavy ball with a mass of 42 kg from a silver rod 2.7 m long by 1.9 mm by 2.6 mm. You measure the stretch of the rod,
nadezda [96]

Answer:

Explanation:

cross sectional area  A = 1.9 x 2.6 x 10⁻⁶ m²

= 4.94 x 10⁻⁶ m²

stress = 42 x 9.8 / 4.94 x 10⁻⁶

= 83.32 x 10⁶ N/m²

strain = .002902 / 2.7

= 1.075 x 10⁻³

Young's modulus = stress / strain

= 83.32 x 10⁶ / 1.075 x 10⁻³

= 77.5 x 10⁹ N/m²

5 0
3 years ago
What is the average distance (in terms of R) between the mobile on the fringe of the serving cell and the second and third tier
kramer

Answer:

do you need all work shown for this?

4 0
3 years ago
Look at the home page of the Internet Society (www.internetsociety.org) and read about one of the designers of the original ARPA
krek1111 [17]

Answer:

<u>ARPANET is the direct precedent for the Internet, a network that became operational in October 1969 after several years of planning. </u>

Its promoter was DARPA (Defense Advanced Research Projects Agency), a US government agency, dependent on the Department of Defense of that country, which still exists.

Originally, it connected research centers and academic centers to facilitate the exchange of information between them in order to promote research. Yes, being an undertaking of the Department of Defense, it is understood that weapons research also entered into this exchange of information.

It is also explained, without being without foundation, that the design of ARPANET was carried out thinking that it could withstand a nuclear attack by the USSR and, hence, probably the great resistance that the network of networks has shown in the face of major disasters and attacks.

It was the first network in which a packet communication protocol was put into use that did not require central computers, but rather was - as the current Internet is - totally decentralized.

Explanation:

<em><u> Below I present as a summary some of the most relevant aspects exposed on the requested website about the origin and authors of ARPANET:</u></em>

<em><u></u></em>

1. Licklider from MIT in August 1962 thinking about the concept of a "Galactic Network". He envisioned a set of globally interconnected computers through which everyone could quickly access data and programs from anywhere. In spirit, the concept was very much like today's Internet. He became the first head of the computer research program at DARPA, and from October 1962. While at DARPA he convinced his successors at DARPA, Ivan Sutherland, Bob Taylor and MIT researcher Lawrence G. Roberts, of the importance of this network concept.

2.Leonard Kleinrock of MIT published the first article on packet-switching theory in July 1961 and the first book on the subject in 1964. Kleinrock convinced Roberts of the theoretical feasibility of communications using packets rather than circuits, That was an important step on the road to computer networking. The other key step was to get the computers to talk together. To explore this, in 1965, working with Thomas Merrill, Roberts connected the TX-2 computer in Mass. To the Q-32 in California with a low-speed phone line creating the first wide-area (albeit small) computer network built . The result of this experiment was the understanding that timeshare computers could work well together, running programs and retrieving data as needed on the remote machine, but that the circuitry switching system of the phone was totally unsuitable for the job. Kleinrock's conviction of the need to change packages was confirmed.

3.In late 1966 Roberts went to DARPA to develop the concept of a computer network and quickly developed his plan for "ARPANET", and published it in 1967. At the conference where he presented the document, there was also a document on a concept of UK packet network by Donald Davies and Roger Scantlebury of NPL. Scantlebury told Roberts about NPL's work, as well as that of Paul Baran and others at RAND. The RAND group had written a document on packet switched networks for secure voice in the military in 1964. It happened that work at MIT (1961-1967), in RAND (1962-1965) and in NPL (1964-1967) all they proceeded in parallel without any of the investigators knowing about the other work. The word "packet" was adopted from the work in NPL and the proposed line speed to be used in the ARPANET design was updated from 2.4 kbps to 50 kbps.

6 0
3 years ago
Choose the statement that correctly describes the circuit below. image is not found a. The above circuit is invalid because nMOS
OleMash [197]

The statement that correctly describes the circuit is the circuit provided is an example of a CMOS circuit.

<h3>What is a CMOS circuit?</h3>

The CMOS circuit is a term that is often known as "Complementary Metal Oxide Semiconductor."

This is known to be a machine that create integrated circuits and it is one that is often seen a a lot of electronic component and as such, the the circuit provided is an example of a CMOS circuit.

Learn more about circuit  from

brainly.com/question/2969220

#SPJ1

8 0
2 years ago
Other questions:
  • 1. Looking at the case study provided under the Companion Material section, what is the main problem that is addressed in this c
    13·1 answer
  • tech a says that a tire with more wear on the center of the tread is caused by under inflation of the size tech b says featherin
    12·1 answer
  • A Service Schedule is...
    8·2 answers
  • Pehdhdjdjdodnjdndjdjdjfjdk
    11·2 answers
  • Different between an architect and an engineer​
    15·1 answer
  • An automobile having a mass of 1100 kg initially moves along a level highway at 110 km/h relative to the highway. It then climbs
    7·1 answer
  • Lets try to get to 100 sub before charismas day <br> Jordan Gracia 32 sub and 5 videos
    13·2 answers
  • Trapezoidal screw press project
    6·1 answer
  • Which symbol should be used for the given scenario?
    11·1 answer
  • Hi, everyone I'm a high school student in Texas. My engineering teacher is asking us to find an active engineer to complete a li
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!