72.3k views
4 votes
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 Riddik
by
8.0k 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 AdmiralNemo
by
7.9k points

Related questions

asked Jul 9, 2021 86.3k views
Khamis asked Jul 9, 2021
by Khamis
8.2k points
1 answer
3 votes
86.3k views
asked Oct 2, 2021 16.5k views
Secreal asked Oct 2, 2021
by Secreal
8.6k points
2 answers
4 votes
16.5k views
1 answer
0 votes
118k views