Advertisement
Guest User

Untitled

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