#include<stdio.h>
#include<stdlib.h>
int main()
{
int no1,no2,no3;
printf("Enter three numbers\n");
scanf("%d %d %d",&no1,&no2,&no3);
if(no1<no2 && no1<no3)
{
printf("%d is the smallest number\n",no1);
}
else if(no2<no3)
{
printf("%d is the smallest number\n",no2);
}
else
{
printf("%d is the smallest number\n",no3);
}
if(no1>no2 && no1>no3)
{
printf("%d is the largest number",no1);
}
else if(no2>no3)
{
printf("%d is the largest number",no2);
}
else
{
printf("%d is the largest number",no3);
}
return 0;
}
#include<stdlib.h>
int main()
{
int no1,no2,no3;
printf("Enter three numbers\n");
scanf("%d %d %d",&no1,&no2,&no3);
if(no1<no2 && no1<no3)
{
printf("%d is the smallest number\n",no1);
}
else if(no2<no3)
{
printf("%d is the smallest number\n",no2);
}
else
{
printf("%d is the smallest number\n",no3);
}
if(no1>no2 && no1>no3)
{
printf("%d is the largest number",no1);
}
else if(no2>no3)
{
printf("%d is the largest number",no2);
}
else
{
printf("%d is the largest number",no3);
}
return 0;
}