Answered step by step
Verified Expert Solution
Question
1 Approved Answer
5 . 4 LAB: Loops: For Loop Precipitation Analytics ( LT - C - SP 2 4 ) Write a program that first read in
LAB: Loops: For Loop Precipitation Analytics LTCSP
Write a program that first read in an integer that is the number of days of data on precipitation to read from the input. Write a for loop that reads in the amount of precipitation on each of those days and accumulates the total precipitation. Display the total precipitation, and the average precipitation per day. The average precipitation per day must be displayed with decimal places. For full credit, you must use a for loop.
Recall to output a value with decimal places you need to add the following on the Put to output statement: with decimal places.
Ex: If the input is:
the output is:
Total
Average
Ex: If the input is:
the output is:
Total
Average
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started