Advertisement
Lukasz_Miskiewicz

operacje na plikach zad 2

May 24th, 2020
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4. #include <fstream>
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     ofstream zapis_pliku ("dane.txt", ios::app);
  10.     cout<<"podaj swoje imie: ";
  11.     string imie;
  12.     cin>>imie;
  13.     zapis_pliku<<imie<<endl;
  14.  
  15.     cout<<" podaj miejsce zamieszkania: ";
  16.     string miejscezam;
  17.     cin>>miejscezam;
  18.     zapis_pliku<<miejscezam<<endl;
  19.  
  20.     cout<<"podaj nr telefonu: ";
  21.     int nrt;
  22.     cin>>nrt;
  23.     zapis_pliku<<nrt<<endl;
  24.  
  25.     return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement