Advertisement
JakubJaneczek

Zadanie 5

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