Largest number from three given numbers


Levels of difficulty: / perform operation:

Find out the highest number from three given numbers.

C Program

#include <stdio.h>
#include <conio.h>
void main()
{
	int a,b,c,h;
	clrscr();
	printf("\nENTER THREE NUMBERS:\n");
	scanf("%d %d %d",&a,&b,&c);
	h=a;
	if(b>h)
		h=b;
	if(c>h)
		h=c;
	printf("\nHIGHEST NUMBER IS %d",h);
	getch();
}


Output







Quantitative Aptitude
Reasoning
Programming
Interview