Answers for "convert c program to c ++ online"

C++
0

convert c program to c ++ online

// Ex.14 A C Program to find greatest of 3 numbers (nested-if)
#include<conio.h>
#include<stdio.h>
void main()
{
int x,y,z;
clrscr();
printf("Enter three values\n");
scanf("%d%d%d",&x,&y,&z);
if(x>y)
	{
		if(x>z)
		printf("%d is greater",x);
	}
else if(y>z)
	printf("%d is greater",y);
else
	printf("%d is greater",z);
getch();
}
Posted by: Guest on September-29-2021

Browse Popular Code Answers by Language