//WAP to print the largest number of three numbers//
#include<stdio.h>
#include<conio.h>
void main()
{
int a, b, c;
printf("Enter the values\n");
scanf("%d%d%d", &a, &b, &c);
if (a>b&&a>c)
{
printf("Largest number is:- %d\n", a);
}
else if (b>a&&b>c)
{
printf("Largest number is:- %d\n", b);
}
else
{
printf("Largest number is:- %d\n", c);
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int a, b, c;
printf("Enter the values\n");
scanf("%d%d%d", &a, &b, &c);
if (a>b&&a>c)
{
printf("Largest number is:- %d\n", a);
}
else if (b>a&&b>c)
{
printf("Largest number is:- %d\n", b);
}
else
{
printf("Largest number is:- %d\n", c);
getch();
}
- The Input and Output of this program is shown in the pictures below:- INPUT OUTPUT


Comments
Post a Comment