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
Draw the engineering stress-strain curve for (a) bcc; (b) fcc metals and mark important points.
Answers: 1
question
Engineering, 04.07.2019 18:20
Apiston-cylinder device contains 0.1 m3 of liquid water and 0.9 m3 of water vapor in equilibrium at 800 kpa. heat is transferred at constant pressure until the temperature of water reaches 350 °c. determine (a) the quality of water at the initial state (b) the work associated with this process, (c) the heat associated with this process.
Answers: 2
question
Engineering, 06.07.2019 04:10
Areheat rankine cycle operates with water as the working fluid. steam enters the first turbine at 8 mpa and 450°c and exits at 0.8 mpa. it is then reheated to 400°c before entering the second turbine, where it exits at 10 kpa. if the amount of work into the pump is 8.04 kj/kg and the net work per cycle produced is 1410.25 kj/kg, determine the thermal efficiency of the cycle.
Answers: 3
question
Engineering, 06.07.2019 05:10
Through changes in clamping, a sheet-metal forming operation can allow the material to undergo a negative minor strain in the forming limit diagram. explain how this effect can be advantageous.
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
Mathematics, 12.01.2021 19:00
question
English, 12.01.2021 19:00
question
English, 12.01.2021 19:00
Questions on the website: 13722367