paperjam

Untitled

Jun 4th, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.36 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(int argc, char *argv[]){
  4.  
  5.     int n[10], max, x, y;
  6.  
  7.     for (x = 0; x < 10; x++)
  8.     {
  9.         printf("enter #%i = :", x);
  10.         scanf("%d", &n[x]);
  11.         max = n[x];
  12.     }
  13.  
  14.     for (y = 0; y < 10; y++)
  15.     {
  16.         if (max < n[y])
  17.             max = n[y];
  18.     }
  19.  
  20.     printf("Max is %i\n", max);
  21.  
  22.   return 0;
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment