Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Brandon Garcia
- #include <iostream>
- #include <fstream>
- #include <iomanip>
- #include <stdio.h>
- using namespace std;
- int main()
- {
- ifstream Infile("indata.txt");
- int Length[30];
- int item, x;
- if(Infile.is_open());
- {
- int item = 0;
- while (!Infile.eof())
- {
- Infile >> Length[item];
- item++;
- }
- for (x = 0; x < item - 1; x++)
- {
- cout << Length[x] << endl;
- }
- Infile.close();
- }
- else
- {
- cout << " error " << endl;
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement