Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. #include<iostream>
  2. #include<cstdlib>
  3. #include<fstream>
  4.  
  5. using namespace std;
  6.  
  7. int main(){
  8.    
  9.     int filenum[5];
  10.    
  11.     ifstream myfile ("numbers.txt");
  12.    
  13.     for(int x = 0, x < 5, x++){
  14.          myfile >> filenum[x];
  15.          cout << x << "\n";
  16.          }
  17.  
  18.  
  19.   return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement