Advertisement
KarolWozniak

Operacje zadanie 5

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