Advertisement
MeehoweCK

Untitled

Oct 21st, 2023
736
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. int main() {
  4.     std::cout << "Podawaj liczby calkowite, 0 konczy wczytywanie: ";
  5.     int x{};
  6.     std::cin >> x;
  7.     auto max{ x };
  8.     while (x != 0) {
  9.         std::cin >> x;
  10.         if (x > max) {
  11.             max = x;
  12.         }
  13.     }
  14.     std::cout << "Najwieksza wczytana liczba ma wartosc " << max << std::endl;
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement