Advertisement
semsem_elazazy

practical 7

Dec 29th, 2021
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.  int arr [5],i ;
  6.  for(i=0;i<5;i++)
  7.  {
  8.      
  9.      int n=0;
  10.      n=i;
  11.      n++;
  12.      printf("Enter element no.%d :",n);
  13.      scanf("%d",&arr[i]);
  14.      
  15.  }
  16.  int min=arr[0];
  17.  for( i=0 ;i<5; i++)
  18.  {
  19.      if(min>arr[i])
  20.      min = arr[i];
  21.  }
  22.  printf("the min value is %d",min);
  23.  
  24.  
  25.  return 0;
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement