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
Give heat transfer applications for the following, (i) gas turbines (propulsion) ) gas turbines (power generation). (iii) steam turbines. (iv) combined heat and power (chp). (v) automotive engines
Answers: 1
question
Engineering, 04.07.2019 18:20
Ahe-xe mixture containing a 0.75 mole fraction of helium is used for cooling electronics in an avionics application. at a temperature of 300 k and atmospheric pressure, calculate the mass fraction of helium and the mass density, molar concentration and molecular weight of the mixture. if the cooling capacity is 10 l, what is the mass of the coolant?
Answers: 3
question
Engineering, 04.07.2019 18:20
Describe one experiment in which the glass transition temperature and melting temperature of a totally amorphous thermoplastic material can be determined. show the relevant experimental results in a diagram which should be properly annotated with the two temperatures clearly marked. what is likely to happen to the curve in the diagram if the amorphous polymer is replaced by a thermosetting type?
Answers: 2
question
Engineering, 04.07.2019 18:20
For each of the following process: a) sketch the p-v diagram, b)sketch t-s diagram, c) sketch t-v diagram, d) sketch the boundary work on one of the diagrams (a, b or c) and e) sketch the reversible heat transfer on one of the diagrams (a, b or c): 1- isobaric process from compressed liquid to superheated vapor 2- isothermal process from compressed liquid to superheated vapor 3- isentropic process from compressed liquid to superheated vapor
Answers: 3
You know the right answer?
Problem Statement: asions
es
Write a program to prompt the user to input 3 integers bet...
Questions
question
World Languages, 13.10.2020 01:01
question
Mathematics, 13.10.2020 01:01
question
History, 13.10.2020 01:01