Students captured 10 temperature readings in Celsius on a particular day. Write an Algorithm to input ten values and get the average temperature for that day. if the average temperature value is in between 970 Fahrenheit and 990 Fahrenheit then display the message “Your body temperature is normal…”. If it is more than 100.40Fahrenheit then display the message “You have a fever caused by an infection or illness…
input:
array tc(10) \\ 10 temperature readings in Celsius
sum=0
for i from 1 to 10
sum=sum+tc[i]
sc=sum/10 \\ average temperature in Celsius
sf=sc*1.8+32 \\ average temperature in Fahrenheit
if 97<=sf<=99 then
display: “Your body temperature is normal…”
else if sf>100.4 then
display: “You have a fever caused by an infection or illness"
Comments
Leave a comment