Program to find largest of three numbers (C++)

Program to find largest of three numbers

-Program:

#include <stdio.h>
#include <conio.h>
void main () {
int x, y, z;
printf(“Enter X:”);
scanf(“%d”,&x);
printf(“Enter Y:”);
scanf(“%d”,&y);
printf(“Enter Z:”);
scanf(“%d”,&z);
if (x>y && x>z)
printf(“\nX is greater than Y and Z”);
else if (y>x && y>z)
printf(“\nY is greater than X and Z”);
else if (z>x && z>y)
printf(“\nZ is greater than X and Y”);
else
printf(“You entered some equal numbers!”);
getch();
}

OUTPUT:

Find Largest Number Program

Find Largest Number Program


“My posts/articles/images are not allowed to be stolen/copied anywhere at Cyber space. Doing so will allow me to take a legal action against the copier.”

Leave a Comment

Kindly solve the following puzzle to prove that you\'re not a bot: