# Programming logic and design

posted by .

Design a program that lets the user enter the total rainfall for each 12 months into an array. The program should calculate and display the total rainfall for the year the average monthly rainfall, and the month with the highest and lowest amounts.

In pseudo-code and a flowchart

• design, no particular language design -

first column = n = month number from 1 to 12
second column = rainfall for n R(n)
third column = total rain so far
Rmin = 5000 (unrealistic high)
Rmax = 0
Rav = 0
Rtot = 0
Do loop A for n = 1, 12
If R(n) > Rmax, then Rmax = R(n)
If R(n) < Rmin, then Rmin = R(n)
Rtot = Rtot + R(n) (this is total so far)
Rav = Rtot/n (this is the average so far)
write n, R(n),Rtot, Rav, Rmax, Rmin
A end of loop
end

• Programming logic and design -

1, 12

## Similar Questions

1. ### CIS Design and Programming

Design a program that calculates the total amount of a meal purchased at a restaurant. The program should ask the user to enter the charge for the food, and then calculate the amount of a 15 percent tip and a 7 percent sales tax. Display …
2. ### Computer Programing & Logic Design

Submit pseudocode and a flowchart for the following programming exercise: Largest and Smallest Design a program with a loop that lets the user enter a series of numbers. Theuser should enter -99 to signal the end of the series. After …
3. ### Computer Programing & Logic Design

Submit pseudocode and a flowchart for the following programming exercise: Largest and Smallest Design a program with a loop that lets the user enter a series of numbers. Theuser should enter -99 to signal the end of the series. After …
4. ### C++

I am having trouble identifying the flaws in my code. I need to created a program that calculates the rainfall for a given year in months. I needed it to show the total amount of rain for the year, the average monthly rainfall, and …
5. ### Check my math please

Total Rainfall = rainfall mm x area covered In order to ensure that our values are correct we will need to convert the area covered (the total area of the two tanks) from metres into millimetres. We will also need to convert the total …
6. ### math

the average annual rainfall for a town is 43.2 inches. I know the monthly rainfall has to be 3.6 inches. the difference of a given month's rainfall from the average monthly rainfall is called the deviation. what is the deviation for …
7. ### Programing Logic and design

Design a program that asks the user to enter a store's sales for each day of the week. The amounts should be stored in an one dimensional array. use loop to calculate the total sales for the week and display the results. (In Pseudocode)
8. ### Computer

Create an algorithm, flowchart, and pseudocode for a solution of the following problem. This solution will include the use of arrays needed to complete all parts of the logic. You have requested to develop a program that will record …
9. ### computer science

create an algorithm, owchart, and pseudocode for a solution of the following problem. This solution will include the use of arrays needed to complete all parts of the logic. You have requested to develop a program that will record …
10. ### programing

create an algorithm, flowchart, and pseudocode for a solution of the following problem. This solution will include the use of arrays needed to complete all parts of the logic. You have requested to develop a program that will record …

More Similar Questions