Engineering
Engineering, 04.10.2020 02:01, gracie0818

Problem Statement: asions
es
Write a program to prompt the user to input 3 integers between 1 and 500.
Output the numbers in the order of smallest to largest

Notes: Ask the user to input three numbers and save the numbers in variables called num1, num2, and num3. You determine the
appropriate data type. Use if and else if structures to make decisions. Use relational operators && (and) and II (or) where needed. There
are several variations on exactly what logic to use to solve this. I want you to use the method that makes sense to you. This is an
exercise in the use of if statements and relational operators.

Method 1: You may create 3 additional variables low, middle, high and store the numbers in those variables. Then you output low,
middle and high. So you test for the lowest number and assign it to the variable low. Test for the highest number and assign it to the
variable high. Then assign the remaining number to the middle.
Method 2 (Bonus): Output the numbers in the correct order WITHOUT creating 3 new variables. This involves more if statements and
relational operators. (For example, first output the low number by checking for 3 possibilities, low is num1 or low is num2 or low is
num3. If num1 is less than num2 AND num1 is less than num3 then num1 is lowest.)

answer
Answers: 2

Other questions on the subject: Engineering

image
Engineering, 03.07.2019 14:10, volleyballfun24
If the thermal strain developed in polyimide film during deposition is given as 0.0044. assume room temperature is kept at 17.3 c, and thermal coefficient of expansion for the film and the substrate are 54 x 10^-6c^-1 and 3.3 x 10^-6c^-1respectively. calculate the deposition temperature.
Answers: 3
image
Engineering, 04.07.2019 18:10, oliviasoreo92
Compute the pressure drop of 30Β°c air flowing with a mean velocity of 8 m/s in a circular sheet-metal duct 300 mm in diameter and 15 m long. use a friction factor, f 0.02, and pair = 1.1644 kg/m a. 37.26 pa b. 25.27 pa n c. 29.34 pa d. 30.52 pa
Answers: 1
image
Engineering, 04.07.2019 18:20, ashleyjaslin
Derive the correction factor formula for conical nozzle i=-(1+ cosa) and calculate the nozzle angle correction factor for a nozzle whose divergence hal-fangle is 13 (hint: assume that all the mass flow originates at the apex of the cone.
Answers: 3
image
Engineering, 04.07.2019 18:20, annette211pdd8v9
For a gate width of 2 m into the paper, determine the force required to hold the gate abc at its location.
Answers: 1
Do you know the correct answer?
Problem Statement: asions
es
Write a program to prompt the user to input 3 integers bet...

Questions in other subjects:

Konu
Physics, 01.11.2020 16:40
Konu
Mathematics, 01.11.2020 16:40
Konu
Computers and Technology, 01.11.2020 16:40
Konu
Engineering, 01.11.2020 16:40
Konu
English, 01.11.2020 16:40
Konu
English, 01.11.2020 16:40