Advertisement
Makteti

Matura_2K8_v2

Oct 14th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6.  
  7. {
  8. string zawodnik;
  9. cout << "Ktorego zawodnika chcesz sprawdzic?" << endl;
  10. cin >> zawodnik;
  11. if (zawodnik == "a")
  12. {
  13. float a = 60.51, b = 61.34, c = 61.85, d = 61.97, e = 62.79, f = 63, g = 63.81, h = 63.88;
  14. if (a>b&&a>c&&a>d&&a>e&&a>f&&a>g&&a>h) cout << a << endl;
  15. if (b>a&&b>c&&b>d&&b>e&&b>f&&b>g&&b>h) cout << b << endl;
  16. if (c>a&&c>b&&c>d&&c>e&&c>f&&c>g&&c>h) cout << c << endl;
  17. if (d>a&&d>b&&d>c&&d>e&&d>f&&d>h&&d>g) cout << d << endl;
  18. if (e>a&&e>b&&e>c&&e>d&&e>f&&e>g&&e>h) cout << e << endl;
  19. if (f>a&&d>b&&f>c&&f>d&&f>e&&f>g&&f>h) cout << f << endl;
  20. if (g>a&&g>b&&g>c&&g>d&&g>e&&g>f&&g>h) cout << g << endl;
  21. if (h>a&&h>b&&h>c&&h>d&&h>e&&h>f&&h>g) cout << h << endl;
  22. }
  23. if (zawodnik == "b")
  24. {
  25. float a = 60.41, b = 60.44, c = 60.85, d = 62.79, e = 61.79, f = 60;
  26. if (a>b&&a>c&&a>d&&a>e&&a>f) cout << a << endl;
  27. if (b>a&&b>c&&b>d&&b>e&&b>f) cout << b << endl;
  28. if (c>a&&c>b&&c>d&&c>e&&c>f) cout << c << endl;
  29. if (d>a&&d>b&&d>c&&d>e&&d>f) cout << d << endl;
  30. if (e>a&&e>b&&e>c&&e>d&&e>f) cout << e << endl;
  31. if (f>a&&f>b&&f>c&&f>d&&f>f) cout << f << endl;
  32. return 0;
  33. }
  34. if (zawodnik == "c")
  35. {
  36. float a = 61.45, b = 60.89, c = 60.20, d = 59.22, e = 59.22, f = 58.99, g = 58.75;
  37. if (a>b&&a>c&&a>d&&a>e&&a>f&&a>g) cout << a << endl;
  38. if (b>a&&b>c&&b>d&&b>e&&b>f&&b>g) cout << b << endl;
  39. if (c>a&&c>b&&c>d&&c>e&&c>f&&c>g) cout << c << endl;
  40. if (d>a&&d>b&&d>c&&d>e&&d>f&&d>g) cout << d << endl;
  41. if (e>a&&e>b&&e>c&&e>d&&e>f&&e>g) cout << e << endl;
  42. if (f>a&&d>b&&f>c&&f>d&&f>e&&f>g) cout << f << endl;
  43. if (g>a&&g>b&&g>c&&g>d&&g>e&&g>f) cout << g << endl;
  44. return 0;
  45. }
  46. return 0;
  47.  
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement