Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int main() {
- std::cout << "Podawaj liczby calkowite, 0 konczy wczytywanie: ";
- int x{};
- std::cin >> x;
- auto max{ x };
- while (x != 0) {
- std::cin >> x;
- if (x > max) {
- max = x;
- }
- }
- std::cout << "Najwieksza wczytana liczba ma wartosc " << max << std::endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement