Find maximum value with three variable:
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter A Value :- ");
scanf("%d",&a);
printf("Enter B Value :- ");
scanf("%d",&b);
printf("Enter C Value :- ");
scanf("%d",&c);
if(a>b)
{
printf("A is Max");
}
else if(b>c)
{
printf("B is Max");
}
else
{
printf("C is Max");
}
getch();
}
Output:
EmoticonEmoticon