/*wap to find maximum & minimum num. out of given three int num.*/ #include<stdio.h> #include<conio.h> void main() { int a,b,c; clrscr(); printf("enter three int num.:\n"); scanf("\n%d\n%d\n%d",&a,&b,&c); if(a>=b&&a>=c) { printf("\nmax. num.:%d",a); } else if(b>=c&&b>=a) { printf("\nmax. num.:%d",b); } else if(c>=a&&c>=b) { printf("\nmax. num.:%d",c); } if(a<=b&&a<=c) { printf("\nmin. num.:%d",a); } else if(b<=c&&b<=a) { printf("\nmin. num.:%d",b); } else if(c<=a&&c<=b) { printf("\nmin. num.:%d",c); } getch(); }
wap to find maximum & minimum number out of given three int number by user
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment