Advertisement
Josif_tepe

Untitled

Apr 11th, 2023
684
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 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.     do {
  12.         cin >> broj;
  13.         if(broj > najgolem_broj) {
  14.             najgolem_broj = broj;
  15.         }
  16.     }
  17.     while(broj != 0);
  18.    
  19.    
  20.     cout << najgolem_broj << endl;
  21.  
  22.    
  23.    
  24.  
  25.     return 0;
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement