For example if 5,6 and 7 are entered by the user then 5 will be displayed smallest. For more idea
lets have a look for the source code written below:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<conio.h> | |
int main() | |
{ | |
int a,b,c; | |
printf("enter the values of a,b,c"); | |
scanf("%d%d%d",&a,&b,&c); | |
if((a<b)&&(a<c)) | |
printf("a=%d is smallest",a); | |
else if((b<a)&&(b<c)) | |
printf("b=%d is smallest",b); | |
else | |
printf("c=%d is smallest",c); | |
} | |
0 comments :
Post a Comment