Advertisement
Guest User

Struckt kawalek

a guest
Jan 24th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <conio.h>
  4. #include <stdio.h>
  5. using namespace std;
  6.  
  7. struct user{
  8. string imie;
  9. string nazwisko;
  10. string nazwa;
  11. string haslo;
  12. };
  13.  
  14. int main(){
  15.  
  16. user jonasz16 =
  17. {
  18. "Piotr",
  19. "Januszewski",
  20. "jonasz16",
  21. "12ab$73"
  22. };
  23.  
  24. user andrzej112 =
  25. {
  26. "Andrzej",
  27. "Nowicki",
  28. "andrzej112",
  29. "zaq1@WSX"
  30. };
  31.  
  32. user nowy;
  33.  
  34. cout << "Podaj imie: "<<endl;
  35. cin >> nowy.imie;
  36. cout << "Podaj nazwisko: "<< endl;
  37. cin >> nowy.nazwisko;
  38. cout << "Podaj nazwe użytkownika: "<< endl;
  39. cin >> nowy.nazwa;
  40. cout << "Podaj haslo: "<<endl;
  41. cin >> nowy.haslo;
  42.  
  43. cout <<"lista uzytkownikow: " << endl;
  44. cout << jonasz16.imie << " " << jonasz16.nazwisko << " " << jonasz16.nazwa << " " << jonasz16.haslo<<endl;
  45. cout << andrzej112.imie << " " << andrzej112.nazwisko << " " << andrzej112.nazwa << " " << andrzej112.haslo<<endl;
  46. cout << nowy.imie << " " << nowy.nazwisko << " " << nowy.nazwa << " " << nowy.haslo<<endl;
  47.  
  48. system("PAUSE");
  49. getche();
  50. return 0;
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement