a) Draw a flow chart for a program that inputs a temperature into a variable Temp and prints a message that depends on the temperature that is recorded.

Question

Temperatures greater than 50, print *Danger too hot”. Temperatures greater than 35 and up to 50, print “Very hot” Temperatures greater than 20 or equal to 20 and up to 35, print “Perfect”. Temperatures greater than -5 and up to 20 print “Cold”. Otherwise, the program ends and prints an error in input.

b) Translate your flow chart into a subroutine called CheckTemp().

Leave an answer

Sorry, you do not have permission to answer to this question .