Advertisement
Md_hosen_zisad

n-num-maxmin

Aug 6th, 2017
447
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3.  
  4. {
  5.     double num,i,n,max=-9999,min=9999;
  6.  
  7.     printf("Enter the value of ==");
  8.     scanf("%lf",&n);
  9.    for(i=0;i<n;i++)
  10.    {
  11.        scanf("%lf",&num);
  12.        if(num>=max)
  13.         max=num;
  14.        if(num<=min)
  15.         min=num;
  16.    }
  17.    printf(" \n %lf \n%lf",max,min);
  18.  
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement