Advertisement
Guest User

scan number maximum

a guest
Oct 17th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. #include<stdio.h>
  2.  int main()
  3.  {
  4.      int i,k,1;
  5.      int max=0;
  6.      print("number of input:\n");
  7.      scanf("%d",&k);
  8.      for(i=1;i<=k;i++)
  9.      {
  10.          printf("Enter valu %d:\n",i);
  11.          scanf("%d",&1);
  12.          if(i==0)max=1;
  13.          if(1>max)
  14.          {
  15.              max=1;
  16.          }
  17.  
  18.      }
  19.      printf("max valu=%d",max);
  20.      return 0;
  21.  
  22.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement