Write a program to input three numbers and print the smallest number.qbasic
Answers
Answered by
3
Answer:
#include<stdio.h>
int main()
{
int num1,num2,num3;
printf("Enter three numbers:");
scanf("%d %d %d"&num1,&num2,&num3);
if(num1 < num2 && num1 < num3)
{
printf("%d is smallest",num1);
}
else if(num2 < num3)
{
printf("%d is smallest",num2);
}
else
{
printf("%d is smallest",num3);
}
return 0;
}
Explanation:
Similar questions