Advertisement
Eddie_1337

bac 2009 var 14 sub 3 ex 3

Nov 1st, 2017
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3.  
  4. using namespace std;
  5.  
  6. ifstream f("BAC.TXT");
  7.  
  8. int main() {
  9.     int x, i = 0;
  10.     while (f >> x) {
  11.         i++;
  12.         cout << x << ' ';
  13.         if (!(i % 5))
  14.             cout << endl;
  15.     }
  16.     f.close();
  17.     cout << endl;
  18.     system("pause");
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement