1234
1 1 1 2 4 8 3 9 27 4 16 64
123456
while( !ifile.eof() ) { ifile >> n1 >> n2 >> n3; if( ifile.eof() ) break; // ... process }