Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- //txt dat
- using namespace std;
- int main()
- {
- fstream f;
- int i=1;
- f.open("test.txt",ios::out);
- for(i=1; i<=100; i++){
- f<<i<<" "<<i*i<<" "<<i*i*i<<endl;
- }
- f.close();
- int E[100];
- int N[100];
- int H[100];
- f.open("test.txt",ios::in);
- for(i=0;i<100;i++){
- f>>E[i];
- f>>N[i];
- f>>H[i];
- }
- cout<< H[99];
- i=0;
- while( !f.eof() ){
- f>>E[i];
- f>>N[i];
- f>>H[i];
- i++;
- }
- f.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement