Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.60 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main ()
  4. {
  5.     int broj, cifra=0, max=1, najgolem=0;
  6.     char c;
  7.     while (scanf("%d", &broj))
  8.     {
  9.         if (broj==c)
  10.         {
  11.         break;
  12.         }
  13.         int pomosenB=broj;
  14.         while (pomosenB>0)
  15.         {
  16.            
  17.             pomosenB/=10;
  18.             if (max<pomosenB)
  19.             {
  20.                 max=pomosenB;
  21.             }
  22.         }
  23.        
  24.        
  25.         if(max>najgolem)
  26.         {
  27.             najgolem=broj;
  28.         }
  29.        
  30.  
  31.     }
  32.     printf ("Najgolema najznacajna cifra ima brojot %d i e na pozicija ", najgolem);
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement