Saved Bookmarks
| 1. |
Abdul is a student of Watford International School. He wants to develop a computer program to displaya message on the screen according to the temperature fed by the user. If the temperature is greater than40 oC it displays “Hot – go for swimming”, if the temperature is greater than 20 oC it displays “Mild –play football” otherwise it displays “Cold – stay at home”.c. Construct an algorithm for the given problem to produce the expected output. |
|
Answer» 1) Start. 2) Declare variable TEMP 3) if(Temp > 40) print (HOT - go for swimming) 4) else if(Temp > 20) print (Mild - play football) 5) else 6) stop Hope it helps :) |
|