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
A pinion and gear pair is used to transmit a power of 5000 W. The teeth numbers of pinion
tester [92]

Answer:

mark me as a brainleast

Explanation:

209781

6 0
3 years ago
Argue the importance to society of incorporating green building into an engineer’s designs, with at least two examples.
klio [65]
It is important because now a days we all need help from engineers
3 0
3 years ago
A 35-ft³ rigid tank has propane at 25 psia, 540 R and is connected by a valve to another tank of 20 ft³ with propane at 40 psia,
gulaghasi [49]

Answer:

final pressure = 200KPa or 29.138psia

Explanation:

The detailed step by step calculations with appropriate conversion factors applied are as shown in the attachment.

8 0
3 years ago
When adding two 8 bit binary numbers, which of the following statements is true?
diamong [38]

Answer:

The result might require 9 bits to store

4 0
2 years ago
HELP HELP HELP
Fantom [35]

Summary

Students learn about the variety of materials used by engineers in the design and construction of modern bridges. They also find out about the material properties important to bridge construction and consider the advantages and disadvantages of steel and concrete as common bridge-building materials to handle compressive and tensile forces.

This engineering curriculum aligns to Next Generation Science Standards (NGSS).

Engineering Connection

When designing structures such as bridges, engineers carefully choose the materials by anticipating the forces the materials (the structural components) are expected to experience during their lifetimes. Usually, ductile materials such as steel, aluminum and other metals are used for components that experience tensile loads. Brittle materials such as concrete, ceramics and glass are used for components that experience compressive loads.

Learning Objectives

After this lesson, students should be able to:

List several common materials used the design and construction of structures.

Describe several factors that engineers consider when selecting materials for the design of a bridge.

Explain the advantages and disadvantages of common materials used in engineering structures (steel and concrete).

Educational Standards

NGSS: Next Generation Science Standards - Science

Common Core State Standards - Math

International Technology and Engineering Educators Association - Technology

State Standards

Suggest an alignment not listed above

Subscribe

Get the inside scoop on all things TeachEngineering such as new site features, curriculum updates, video releases, and more by signing up for our newsletter!

PS: We do not share personal information or emails with anyone.

Email Address

First name (optional)

Last Name (optional)

Subscribe to TE Newsletter

Worksheets and Attachments

Strength of Materials Worksheet (doc)

Strength of Materials Worksheet (pdf)

Strength of Materials Worksheet Answers (doc)

Strength of Materials Worksheet Answers (pdf)

Strength of Materials Math Worksheet (doc)

Strength of Materials Math Worksheet (pdf)

Strength of Materials Math Worksheet Answers (doc)

Strength of Materials Math Worksheet Answers (pdf)

More Curriculum Like This

MIDDLE SCHOOL Activity

Breaking the Mold

Explanation:

pabrainlest Poe ty

8 0
2 years ago
Other questions:
  • why HF (hydrogen fluoride) has higher boiling temperature than HCl (hydrogen chloride), even thought HF has lower molecular weig
    8·1 answer
  • A Water Amusement Park parking lot charges $24.00 minimum fee to park for up to 8 hours. The meter charges an additional $3.25 p
    5·2 answers
  • QUESTIONS
    12·1 answer
  • An undeformed specimen of some alloy has an average grain diameter of 0.050 mm. You are asked to reduce its average grain diamet
    11·1 answer
  • Wave flow of an incompressible fluid into a solid surface follows a sinusoidal pattern. Flow is two-dimensional with the x-axis
    13·1 answer
  • Mnsdcbjksdhkjhvdskjbvfdfkjbcv hjb dfkjbkjfvvfebjkhbvefgjdf
    7·2 answers
  • Which of the following activities could be considered unethical?
    7·1 answer
  • 1. A hydro facility operates with an elevation difference of 50 m and a flow rate of 500 m3/s. If the rotational speed is 90 RPM
    12·1 answer
  • What could I do to make this bridge hold more weight without making it heavier? Lateral bracing and a design on the top will be
    14·1 answer
  • Which step in the engineering design process does not come before building a<br> prototype?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!