Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- string zawodnik;
- cout << "Ktorego zawodnika chcesz sprawdzic?" << endl;
- cin >> zawodnik;
- if (zawodnik == "a")
- {
- float a = 60.51, b = 61.34, c = 61.85, d = 61.97, e = 62.79, f = 63, g = 63.81, h = 63.88;
- if (a>b&&a>c&&a>d&&a>e&&a>f&&a>g&&a>h) cout << a << endl;
- if (b>a&&b>c&&b>d&&b>e&&b>f&&b>g&&b>h) cout << b << endl;
- if (c>a&&c>b&&c>d&&c>e&&c>f&&c>g&&c>h) cout << c << endl;
- if (d>a&&d>b&&d>c&&d>e&&d>f&&d>h&&d>g) cout << d << endl;
- if (e>a&&e>b&&e>c&&e>d&&e>f&&e>g&&e>h) cout << e << endl;
- if (f>a&&d>b&&f>c&&f>d&&f>e&&f>g&&f>h) cout << f << endl;
- if (g>a&&g>b&&g>c&&g>d&&g>e&&g>f&&g>h) cout << g << endl;
- if (h>a&&h>b&&h>c&&h>d&&h>e&&h>f&&h>g) cout << h << endl;
- }
- if (zawodnik == "b")
- {
- float a = 60.41, b = 60.44, c = 60.85, d = 62.79, e = 61.79, f = 60;
- if (a>b&&a>c&&a>d&&a>e&&a>f) cout << a << endl;
- if (b>a&&b>c&&b>d&&b>e&&b>f) cout << b << endl;
- if (c>a&&c>b&&c>d&&c>e&&c>f) cout << c << endl;
- if (d>a&&d>b&&d>c&&d>e&&d>f) cout << d << endl;
- if (e>a&&e>b&&e>c&&e>d&&e>f) cout << e << endl;
- if (f>a&&f>b&&f>c&&f>d&&f>f) cout << f << endl;
- return 0;
- }
- if (zawodnik == "c")
- {
- float a = 61.45, b = 60.89, c = 60.20, d = 59.22, e = 59.22, f = 58.99, g = 58.75;
- if (a>b&&a>c&&a>d&&a>e&&a>f&&a>g) cout << a << endl;
- if (b>a&&b>c&&b>d&&b>e&&b>f&&b>g) cout << b << endl;
- if (c>a&&c>b&&c>d&&c>e&&c>f&&c>g) cout << c << endl;
- if (d>a&&d>b&&d>c&&d>e&&d>f&&d>g) cout << d << endl;
- if (e>a&&e>b&&e>c&&e>d&&e>f&&e>g) cout << e << endl;
- if (f>a&&d>b&&f>c&&f>d&&f>e&&f>g) cout << f << endl;
- if (g>a&&g>b&&g>c&&g>d&&g>e&&g>f) cout << g << endl;
- return 0;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement