Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. struct parameters {
  7. string title;
  8. int duration;
  9. };
  10.  
  11. parameters registerParticipant()
  12. {
  13. cout << "Zaglavie" << endl;
  14. string title;
  15. cin >> title;
  16. cout << "Produljenie (v minuti)" << endl;
  17. int duration;
  18. cin >> duration;
  19.  
  20. parameters current = { title , duration };
  21.  
  22. return current;
  23. }
  24.  
  25. int main()
  26. {
  27. parameters current[5];
  28. //vuvejdash gi
  29. for (int i = 0; i < 5; i++)
  30. {
  31. current[i] = registerParticipant();
  32. }
  33.  
  34.  
  35.  
  36.  
  37.  
  38. //izvejdash gi
  39. for (int i = 0; i < 5; i++)
  40. {
  41. cout << current[i].title << " " << current[i].duration << endl;
  42. }
  43.  
  44. //system("pause");
  45. return 0;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement