Help with Nested loop

Hello, i posted a problem similar to this already, but i now have some code down and just want some assistance. My program uses a nested loop to import data from an input file and outputs data to another file. From what i have, I can get it to take the first number from my file, but i cant get it to continue to take the rest of the data from the file, it just repeats the first number over and over. I know i have a lot going on here and that a lot may be wrong, But any suggestions will help. Thank you.
Heres my code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include <iostream>
#include <cmath>
#include <fstream>
#include <iomanip>

using namespace std;

int main()
{ 
    int count;
    int outer;
    int inner;
    int inrain;
    int testNumber;
    
    ifstream inNumber;  // input file stream name
    ofstream outNumber;  // output file stream name
    
    outNumber << fixed << showpoint;
    outNumber << setprecision(2);
    
    // open both of our input and output files
    inNumber.open("inrain.txt");
    outNumber.open("outrain.txt");
    
cout << "This Program collects data and calculates the average rainfall over years." << endl;
cout << endl;
cout << "Please see Output File for Results " << endl;
cout << endl;

outNumber << "Data for year 1 " << endl;
outNumber << endl;

inNumber >> inrain;

for( outer= 1; outer <= 3; outer++ ) {
	
	for(inner=1; inner<=12; inner++){
      	outNumber << "Number of Inches for Month " << inner << " : " << inrain << setw(6) << endl;
      	if (inner == 12) {
		outNumber << endl << endl;
         
	}//end if
      	
} // end inner
} // end outer


//Close all files
    inNumber.close();
    outNumber.close();

// Pause Program
    system ("PAUSE"); 
    
    return 0;
    
}   // End Main 
Topic archived. No new replies allowed.