Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3.  
  4. using namespace std;
  5.  
  6. string imie, nazwisko;
  7. int nr_tel;
  8.  
  9. int main()
  10. {
  11.  
  12.  
  13. cout << "Podaj imie: "; cin>>imie;
  14. cout << "Podaj nazwisko: "; cin>>nazwisko;
  15. cout << "Podaj numer telefonu: "; cin>>nr_tel;
  16.  
  17. fstream plik;
  18. plik.open("wizytowka.txt", ios::out | ios:app);
  19.  
  20. plik<<imie<<endl;
  21. plik<<nazwisko<<endl;
  22. plik<<nr_tel<<endl;
  23. endl;
  24.  
  25. plik.close();
  26.  
  27.  
  28.  
  29.  
  30.  
  31. return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement