subject
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.)

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Determine whether or not it is possible to compress air adiabatically from k to 140 kpa and 400 k. what is the entropy change during this process?
Answers: 3
question
Engineering, 04.07.2019 18:10
Items are similar to the free issue items, but their access is limited. (clo5) a)-bin stock items free issue b)-bin stock controlled issue c)-critical or insurance spares d)-rebuildable spares e)-consumables
Answers: 1
question
Engineering, 04.07.2019 18:10
Calculate the bore of a cylinder that has a stroke of 18 inches and an extension time of 6 seconds at a flow rate of 4 gal/min.
Answers: 3
question
Engineering, 04.07.2019 18:10
Awall of 0.5m thickness is to be constructed from a material which has average thermal conductivity of 1.4 w/mk. the wall is to be insulated with a material having an average thermal conductivity of 0.35 w/mk so that heat loss per square meter shall not exceed 1450 w. assume inner wall surface temperature of 1200°c and outer surface temperature of the insulation to be 15°c. calculate the thickness of insulation required.
Answers: 3
You know the right answer?
Problem Statement: asions
es
Write a program to prompt the user to input 3 integers bet...
Questions
Questions on the website: 13722363