Problem? have no idea.....

I am in C++ class and this problem has got me. I have no idea where to start. can someone help me with this problem? get me started or just show me what codes does what? I found this site and I am hoping it will be what I need.

****************************
The problem
****************************
Write a program that uses nested loops to collect data and calculate the average rainfall over a period of years. The program should first ask for the number of years. The outer loop will iterate once for each year. The inner loop will iterate twelve times, once for each month. Each iteration of the inner loop will ask the user for the inches of rainfall for that month.

Input Validation: Do not accept a number less than 1 for the number of years. Do not accept negative numbers for the monthly rainfall.

If nothing else tutor me... thanks
1
2
3
4
5
6
7
8
for (int years = 1; years <= total_years; years++) //outer loop
  {
    for (int months = 1; months <= 12; months++) //inner/nested loop
      {
        //do your rainfall summation here
      }
  }
//compute the average here 


That is basically the heart and soul of the program. It is up to you to figure out how to compute the numbers themselves and how to validate the input.
Topic archived. No new replies allowed.