sandra0309

audi4.vezba8

Jan 17th, 2015
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. #include<stdio.h>
  2. int main ()
  3. { int maxi=0,n,maxi1=0;
  4.  
  5.  while(scanf("%d",&n))
  6.  {
  7.  
  8.     if(n>maxi)
  9.       {maxi1=maxi;
  10.         maxi=n;
  11.  
  12.       }
  13.  
  14.       else if(n>maxi1)
  15.         {
  16.          maxi1=n;
  17.         }
  18.  
  19.  
  20.  
  21.   }
  22.  
  23.  
  24.  
  25.  printf("%d %d",maxi,maxi1);
  26.  
  27.  
  28.  
  29.  
  30. return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment