Advertisement
Lukasz_Miskiewicz

operacje na plikach zad 5

May 24th, 2020
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4. #include <fstream>
  5. using namespace std;
  6. int c;
  7.  
  8. int main()
  9. {
  10.     string odczyt;
  11.     ifstream odczyt_pliku ("wierszyk.txt");
  12.     for(int i=1;i<85;i++)
  13.     {
  14.         getline(odczyt_pliku,odczyt);
  15.         if(i%2==0)
  16.         {
  17.             cout <<odczyt<<endl;
  18.         }
  19.     }
  20.     cout<<c;
  21.  
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement