/*program
to find the smallest number within three numbers*/
void main()
{
int a,b,c;
clrscr();
printf("Enter
three numbers ");
scanf("%d%d%d",&a,&b,&c);
if(a<b
&& a<c)
printf("%d
is smallest",a);
else if(b<a
&& b<c)
printf("%d
is smallest",b);
else
printf("%d
is smallest",c);
}
Output
Enter three
numbers 24 53 12
12 is smallest
No comments:
Post a Comment