Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <cstdlib>
  4. #include <ctime>
  5.  
  6. using namespace std;
  7.  
  8. int Imie()
  9. {
  10. srand(time(0));
  11.  
  12. const string Imie[8] = { "Szymon",
  13. "Maciej", "Bartek", "Mikolaj", "Rafal", "Kuba", "Janusz", "Patryk" };
  14.  
  15. string word = Imie[rand() % 8];
  16.  
  17. cout << word;
  18. cout<<" ";
  19. }
  20.  
  21.  
  22. int Nazwisko()
  23. {
  24. srand(time(0));
  25.  
  26. const string Nazwisko[8] = { "Kowalski",
  27. "Grudzinski", "Zenker", "Kupsik", "Malecki", "Ryczek", "Solowski", "Zacios" };
  28.  
  29. string word = Nazwisko[rand() % 8];
  30.  
  31. cout << word;
  32. cout<<" ";
  33. }
  34.  
  35.  
  36.  
  37. int Cyfra()
  38. {
  39. srand(time(0));
  40.  
  41. const string Cyfra[8] = { "123",
  42. "432", "764", "666", "776", "453", "875", "923" };
  43.  
  44. string word = Cyfra[rand() % 8];
  45.  
  46. cout << word;
  47. cout<<" ";
  48. }
  49.  
  50.  
  51.  
  52. int Email()
  53. {
  54. srand(time(0));
  55.  
  56. const string Email[8] = { "[email protected]",
  57.  
  58. string word = Email[rand() % 8];
  59.  
  60. cout << word;
  61. cout<<" ";
  62. }
  63.  
  64. int main()
  65. {
  66. cout<<Imie();
  67. cout<<Nazwisko();
  68. cout<<Cyfra();
  69. cout<<Email();
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement