106k views
1 vote
write a pseudocode that reads temperature for each day in a week, in degree celcius, converts the celcious into fahrenheit and then calculate the average weekly temperatures. the program should output the calculated average in degrees fahrenheit

User WatersLake
by
3.3k points

1 Answer

7 votes

Answer:

total = 0

for i = 1 to 7

input temp

temp = temp * 1.8 + 32

total + = temp

average = total/7

print average

Step-by-step explanation:

[Initialize total to 0]

total = 0

[Iterate from 1 to 7]

for i = 1 to 7

[Get input for temperature]

input temp

[Convert to degree Fahrenheit]

temp = temp * 1.8 + 32

[Calculate total]

total + = temp

[Calculate average]

average = total/7

[Print average]

print average

User Joel B Fant
by
4.4k points