Lets take an example. If we enter 5 9 3 as the three numbers then 9 will be displayed largest.
For more idea
the source code for the following program has been given 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 largest",a); | |
else if((b>a)&&(b>c)) | |
printf("b=%d is largest",b); | |
else | |
printf("c=%d is largest",c); | |
} | |
0 comments :
Post a Comment