C Program To Find Middle Number Among Input Three Numbers
#include<stdio.h>
#include<conio.h>
main()
{
int
a,b,c;
printf("Enter
any three numbers=");
scanf("%d%d%d",&a,&b,&c);
if((a>b&&a<c)||(a<b&&a>c))
printf("A
is middle number and number is%d",a);
else
if((b>a&&b<c)||(b<a &&b>c))
printf("B
is middle number and number is%d",b);
else
printf("C
is middle number and number is %d",c);
getch();
}
No comments:
Post a Comment