Write a program to find largest of three numbers - Program of C Languages - Program to Find Largest of Three Numbers
Program to Find Largest of Three Numbers
int main()
{
int x, y, z;
printf("Please Enter three different numbers : ");
scanf("%d %d %d", &x, &y, &z);
if (x > y && x > z)
{
printf("\n%d is Highest", x, y, z);
}
else if (y > x && y > z)
{
printf("\n%d is Highest", y, x, z);
}
else if (z > x && z > y)
{
printf("\n%d is Highest", z, x, y);
}
else
{
printf("\nAll the three values are equal");
}
return 0;
Comments
Post a Comment