Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

I am writing psuedocode for a program that lets the user enter the total rainfall for each of 12 months into an array.

I am writing psuedocode for a program that lets the user enter the total rainfall for each of 12 months into an array. The program should calculate and display the total rainfall for the year, the average monthly rainfall, and the months with the highest and lowest amounts. This is what I have so far, im missing function definition.

Module main ( )

Constant Integer SIZE = 12

Declare Real rainfall [SIZE]

Declare Real totalRainfall, avgRainfall

Declare String monthWithHighestRainfallAmount, monthWithLowestRainfallAmount

Call getMonthlyRainfall (rainfall, SIZE)

Set totalRainfall = getTotalRainfall (rainfall, SIZE)

Set monthWithLowestRainfallAmount = getLowestRainfall (rainfall, SIZE)

Set monthWithHighestRainfallAmount = getHighestRainfall (rainfall, SIZE)

Set avgRainfall = totalRainfall / SIZE

Display "The total rainfall for the year is : "; totalRainfall

Display "The average monthly rainfall is:"; avgRainfall

Display "The Month With the highest rainfall amount is: "; monthWithHighestRainfallAmount

Display "The Month With the lowest rainfall amount is: "; monthWithLowestRainfallAmoun

End For

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question