Advertisement
Josif_tepe

Untitled

Apr 11th, 2023
638
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.    
  6.     int broj;
  7.     cin >> broj;
  8.    
  9.     int najgolem_broj = broj;
  10.    
  11.    
  12.     while(broj != 0) {
  13.         cin >> broj;
  14.         if(broj > najgolem_broj) {
  15.             najgolem_broj = broj;
  16.         }
  17.     }
  18.     cout << najgolem_broj << endl;
  19.  
  20.    
  21.    
  22.  
  23.     return 0;
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement