Answer to Question #225356 in Java | JSP | JSF for mark

Question #225356

Problem #2 (20 points for pseudocode)

 

You are working for the weather channel and you have to write a program that will generate the average temperature for the last 7 days. A modular code is preferred, but a non-modular code is OK. (Provide the pseudocode)


1
Expert's answer
2021-08-11T14:12:04-0400
Start
   Declare variable temperature as double
   Declare variable temperatureSum as double=0
   Declare variable averageTemperature as double
   for t =1 to 7 do
        Prompt the user to enter a temperature
        Read a temperature from the user
        Set temperatureSum to temperatureSum + temperature 
   end for
   averageTemperature = temperatureSum / 7
   Display "The average temperature for the last 7 days: "+averageTemperature 
Stop

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS