Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

‫جامعة تبوك‬

Week 7 Assignment
‫عمادة التعلم اإللكتروني والتعليم عن بعد‬

1. Draw flowchart and then write an algorithm that reads


an integer representing temperature. Then program
prints:
Hot: If the temperature is greater than 30
Moderate: If the temperature is between 16 and 29
Cold: if the temperature is lower than 16
Hint: Use nested IF
1- START
2- Read temperature
3- If temperature > 30 Then
4- display "Hot"
5- Else
6- If temperature >= 16 Then
7- display " Moderate " 8-
Else
9- If temperature < 16 Then
10- display "Cold"
11- End If
12- End If
13- End If
14-END
Start

Read Temerature

True If temperature >30

display "Hot”
false

True If temperature >= 16

Display
"Moderate"
False

True
display
If temperature < 16
" Cold "

false

end

You might also like