Advertisement
Makteti

Matura_2008_oszczepnicy

Oct 14th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 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)
  15. {
  16. cout <<a<<endl;
  17. }
  18.  
  19. if(b>a&&b>c&&b>d&&b>e&&b>f&&b>g&&b>h)
  20. {
  21. cout <<b<<endl;
  22. }
  23.  
  24. if(c>a&&c>b&&c>d&&c>e&&c>f&&c>g&&c>h)
  25. {
  26. cout <<c<<endl;
  27. }
  28. if(d>a&&d>b&&d>c&&d>e&&d>f&&d>h&&d>g)
  29. {
  30. cout <<d<<endl;
  31. }
  32.  
  33. if(e>a&&e>b&&e>c&&e>d&&e>f&&e>g&&e>h)
  34. {
  35. cout <<e<<endl;
  36. }
  37.  
  38. if(f>a&&d>b&&f>c&&f>d&&f>e&&f>g&&f>h)
  39. {
  40. cout <<f<<endl;
  41. }
  42.  
  43. if(g>a&&g>b&&g>c&&g>d&&g>e&&g>f&&g>h)
  44. {
  45. cout <<g<<endl;
  46. }
  47.  
  48. if(h>a&&h>b&&h>c&&h>d&&h>e&&h>f&&h>g)
  49. {
  50. cout <<h<<endl;
  51. }
  52. return 0;
  53. }
  54. if(zawodnik=="b")
  55. {
  56. float a=60.41, b=60.44, c=60.85, d=62.79, e=61.79, f=60;
  57. if(a>b&&a>c&&a>d&&a>e&&a>f)
  58. {
  59. cout <<a<<endl;
  60. }
  61.  
  62. if(b>a&&b>c&&b>d&&b>e&&b>f)
  63. {
  64. cout <<b<<endl;
  65. }
  66.  
  67. if(c>a&&c>b&&c>d&&c>e&&c>f)
  68. {
  69. cout <<c<<endl;
  70. }
  71. if(d>a&&d>b&&d>c&&d>e&&d>f)
  72. {
  73. cout <<d<<endl;
  74. }
  75.  
  76. if(e>a&&e>b&&e>c&&e>d&&e>f)
  77. {
  78. cout <<e<<endl;
  79. }
  80.  
  81. if(f>a&&f>b&&f>c&&f>d&&f>f)
  82. {
  83. cout <<f<<endl;
  84. }
  85. return 0;
  86. }
  87. if(zawodnik=="c")
  88. {
  89. float a=61.45, b=60.89, c=60.20, d=59.22, e=59.22, f=58.99, g=58.75;
  90. if(a>b&&a>c&&a>d&&a>e&&a>f&&a>g)
  91. {
  92. cout <<a<<endl;
  93. }
  94.  
  95. if(b>a&&b>c&&b>d&&b>e&&b>f&&b>g)
  96. {
  97. cout <<b<<endl;
  98. }
  99.  
  100. if(c>a&&c>b&&c>d&&c>e&&c>f&&c>g)
  101. {
  102. cout <<c<<endl;
  103. }
  104. if(d>a&&d>b&&d>c&&d>e&&d>f&&d>g)
  105. {
  106. cout <<d<<endl;
  107. }
  108.  
  109. if(e>a&&e>b&&e>c&&e>d&&e>f&&e>g)
  110. {
  111. cout <<e<<endl;
  112. }
  113.  
  114. if(f>a&&d>b&&f>c&&f>d&&f>e&&f>g)
  115. {
  116. cout <<f<<endl;
  117. }
  118.  
  119. if(g>a&&g>b&&g>c&&g>d&&g>e&&g>f)
  120. {
  121. cout <<g<<endl;
  122. }
  123. return 0;
  124.  
  125. }
  126.  
  127. return 0;
  128.  
  129. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement