I'm lost on what to do in this situation, i don't know if i should name the months month1 and month2 but the problem is if i do that what if they pick another combination of months instead, i just need a clue(s) in the right direction.
#include<iostream>
using namespace std;
int main ()
what is the relationship between the int months ( which don't appear to be used) and month1 etc? If you are working out an average shouldn't you be dividing month1 + month2 + month3 by 3?
It's not clear what you are trying to do at all.
One last thing please use the code tags for posting code, it makes it much easier to read (the # button)
I'm not sure exactly what you are trying to input.
Are you inputting the rainfall (a number)? Or are you inputting a month name? Or both?
It looks like you can forget all the stuff about which month it actually is, as long as you have three month's worth of rainfall data you can still average it.
Also, you can't declare variables that way. It is alwaystype name, name, ...;
So your month1, 2, 3... can be:
1 2
// Three month's worth of rainfall data
int month1, month2, month3;
If I may suggest it though, you would do better with an array:
1 2
// Three month's worth of rainfall data
int monthly_rainfall[ 3 ];
Then you can use a loop to get the information, then another to calculate the average.