daily pastebin goal
91%
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2.  
  3.  
  4. int MaxMin( int *, int *, int *, int *, int * );
  5.  
  6. int main()
  7. {
  8. int n1,n2,n3,max,min;
  9.  
  10. printf("Enrer three numbers :");
  11. scanf("%d %d %d",&n1,&n2,&n3);
  12.  
  13.     printf("The Max  number is:%d ",max);
  14.     printf("The Min  number is:%d ",min);
  15.    
  16.     MaxMin( &n1, &n2, &n3, &max, &min );
  17.  
  18.  
  19.  
  20.     return 0;
  21.  
  22. }
  23.  
  24. int MaxMin( int *n1Ptr, int *n2Ptr, int *n3Ptr, int *max, int *min )
  25. {
  26.  
  27.     if( *n2Ptr > *max )
  28.         *max = *n2Ptr;
  29.  
  30.     if( *n3Ptr > *max )
  31.         *max = *n3Ptr;
  32.  
  33.     if( *n2Ptr < *min )
  34.         *min = *n2Ptr;
  35.  
  36.     if( *n3Ptr < *min )
  37.         *min = *n3Ptr;
  38.  
  39.  
  40.     return *max, *min;
  41.  
  42.  
  43.  
  44. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top