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
Ariver flows from north to south at 8 km/h. a boat is to cross this river from west to east at a speed of 20 km/h (speed of the boat with respect to the earth/ground). at what angle (in degrees) must the boat be pointed upstream such that it will proceed directly across the river (hint: find the speed of the boat with respect to water/river)? a 288 b. 21.8 c. 326 d. 30.2
Answers: 3
question
Engineering, 04.07.2019 18:10
For the closed feedwater heater below, feedwater enters state 3 at a pressure of 2000 psia and temperature of 420 °f at a rate of ix10 ibhr. the feedwat extracted steam enters state 1 at a pressure of 1000 psia and enthalpy of 1500 btu/lbm. the extracted er leaves at an enthalpy of 528.7 btu/lbm steam leaves as a saturated liquid. (16) a) determine the mass flow rate of the extraction steam used to heat the feedwater (10) b) determine the terminal temperature difference of the closed feedwater heater
Answers: 3
question
Engineering, 04.07.2019 18:10
Hydraulic fluid with a sg. of 0.78 is flowing through a 1.5 in. i.d. pipe at 58 gal/min. the fluid has an absolute viscosity of 11.8 x 105 lbf-sec/ft2. is the flow laminar, turbulent or within the critical range? give both a numerical reynolds number and a term answer.
Answers: 3
question
Engineering, 04.07.2019 18:10
Which one from below is not one of the reasons of planning failures? (clo3) a)-planner is careless. b-planner spend less time in the field but more time on the desk c)-planner is not qualified d)-planner does not have sufficient time to properly plan
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
Physics, 21.04.2021 14:00
question
Mathematics, 21.04.2021 14:00
question
Computers and Technology, 21.04.2021 14:00
question
Mathematics, 21.04.2021 14:00
question
Mathematics, 21.04.2021 14:00
question
English, 21.04.2021 14:00
question
Mathematics, 21.04.2021 14:00
Questions on the website: 13722361