Aim:-Write a program to find the largest of three numbers. (Using if-then-else)
Source Code
#include<stdio.h>
#include<conio.h>
main()
{
int A,B,C;
printf("Enter the
1st number=");
scanf("%d",&A);
printf("Enter the
2nd number=");
scanf("%d",&B);
printf("Enter the
3rd number=");
scanf("%d",&C);
if(A>=B&&B>C)
printf("the largest
number is=%d",A);
if(B>=A&&B>=C)
printf("the largest
number is=%d",B);
if(C>=A&&C>=B)
printf("the largest
number is=%d",C);
getch();
}
OutPut
Related post:-
🔥 How to Use Pen Drive As A Ram in Hindi
|
0 Comments
How did you like it, please comment by posting my post