Write a program to find the largest of three numbers.| Shubham tiwari


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:-
What is C language and describe the main characteristics.                                 

🔥 How to Use Pen Drive As A Ram in Hindi

How to Call From Laptop and Computer? and How to track any mobail number?

Post a Comment

0 Comments

Copyright (c) 2019 Designed by Shubham tiwari All Right Reseved