Advertisement
rayslhcf

NisaC

Aug 20th, 2014
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.53 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<conio.h>
  3.  
  4. int main()
  5. {
  6.  
  7. int i, num[10], max, min;
  8. for(i=0; i<10; i++)
  9.     {
  10.              printf("N%02d: ",i+1);
  11.              scanf("%d",&num[i]);
  12.     }
  13.     max=num[0];
  14.     min=num[0];
  15.     for(i=0; i<10; i++)
  16.     {
  17.         if (num[i]>max)
  18.                  {
  19.                        max=num[i];
  20.                  }
  21.         if(num[i]<min)
  22.                  {
  23.                       min=num[i];
  24.                  }
  25.       }
  26.     printf("Max=%d\n",max);
  27.     printf("Min=%d\n",min);
  28.  
  29. return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement