Question: 5. Create a java application that uses nested loops to collect data and calculate the average rainfall over a peniod of years First the program

5. Create a java application that uses nested loops to collect data and calculate the average rainfall over a peniod of years First the program should ask for the number of years. The outer loop will iterate once for each year. The inner loop will iterate 12 times, once for each month. Each iteration of the inner loop will ask the user for the inches of rainfall for that month, the program should display the number of months, the total inches of rainfall, and the average rainfall per month for the entire period Input validation: Do not accept a number less than 1 for the number ofyears. Do not accept negative numbers for the monthly rainfall
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
