Develop a C program to find minimum number from given three integer numbers using if...else ladder and logical operator.
Code
#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\n",num1);}else if(num2 < num3){printf("%d is smallest\n",num2);}else{printf("%d is smallest\n",num3);}return 0;}
Output
0 Comments
Post a Comment