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
Sometimes, steel studs may not be used on outside walls because they are?
Helen [10]

Answer:

We can describe 15×-10 as an expression. we would describe 6×-2< 35 as an...

Explanation:

We can describe 15×-10 as an expression. we would describe 6×-2< 35 as an...

6 0
3 years ago
I ran across this symbol in some Electrical wiring documents and I am unaware of what this means. Any help?
Minchanka [31]

Answer:

Opened Push-button Switch (i.e. a PTM Switch)

Explanation:

Tha's just another symbol for a switch, but this one specifies that the switch is a push-button type of switch.

Since it's not touching and completing the line, the state of the switch is initially open.

6 0
3 years ago
Why do we care about a material's ability to resist torsional deformation?
lesya692 [45]

Answer:

(A) Because the angle of twist of a material is often used to predict its shear toughness

Explanation:

In engineering, torsion is the solicitation that occurs when a moment is applied on the longitudinal axis of a construction element or mechanical prism, such as axes or, in general, elements where one dimension predominates over the other two, although it is possible to find it in diverse situations.

The torsion is characterized geometrically because any curve parallel to the axis of the piece is no longer contained in the plane initially formed by the two curves. Instead, a curve parallel to the axis is twisted around it.

The general study of torsion is complicated because under that type of solicitation the cross section of a piece in general is characterized by two phenomena:

1- Tangential tensions appear parallel to the cross section.

2- When the previous tensions are not properly distributed, which always happens unless the section has circular symmetry, sectional warps appear that make the deformed cross sections not flat.

5 0
3 years ago
name the three exposure techniques in photolithography. what are the alternatives to photolithography in ic processing?
zhenek [66]

The three exposure techniques in photolithography are:

  • Contact
  • Proximity
  • Projection

Alternatives to photolithography in IC processing include;

  • X-ray
  • UV
  • Ion, and
  • Electron lithography

<h3>What is Photolithography?</h3>

Photolithography is a term in integrated circuit development that describes the patterned films that are formed when a beam of light falls on a substance.

This phenomenon protects the surface of sensitive materials such as glass during some operations like etching. UV and X-rays can be used for this purpose.

Learn more about photolithography here:

brainly.com/question/13650094

#SPJ11

6 0
1 year ago
I need ideas for what to build because I have some spare wood.
Misha Larkins [42]

Answer:

small guitar with no strings?

Explanation:

it would be fun to make i think

6 0
3 years ago
Other questions:
  • A lake with constant volume 1.1 x 10^6 m^3 is fed by a stream with a non-conservative pollutant of 2.3 mg/L and flow rate 35 m^3
    14·1 answer
  • Explain how a CO2 cartridge powers the dragster you will be building. A good website to use is How Stuff Works. (howstuffworks.c
    5·2 answers
  • What do you need for an object to fly?
    10·1 answer
  • Before you calculate the moment capacity for a steel beam, you have to determine the classification of beam.
    10·1 answer
  • Select the correct answer.
    5·1 answer
  • Consider a single crystal of nickel oriented such that a tensile stress is applied along a [001] direction. If slip occurs on a
    6·1 answer
  • The value of universal gas constant is same for all gases?<br> a) yes<br> b)No
    15·1 answer
  • Describe a pro and con of having a passenger in the car
    11·1 answer
  • What is the best way to collaborate with your team when publishing Instagram Stories from Hootsuite?
    14·1 answer
  • A school is playing $0.XY per kWh for electric power. To reduce its power bill, the school installs a wind turbine with a rated
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!