find the greatest number among three

source

#include
void main()
{
int a,b,c;
printf("enter three value \n");
scanf("%d%d%d",&a,&b,&c);
if (a>b)
 {
  if (a>c)
  printf("your greatest value is: ",a);
  else
  printf("your greatest value is: ",c);
 }
else
 {
  if (b>c)
  printf("your greatest value is: ",b);
  else
  printf("your greatest value is:%d ",c);
 }
}


output
enter three value 
5
6
7
your greatest value is: 7

Comments

Popular posts from this blog

Bluehost Hosting at just 239 INR

abc

EARN MONEY BY SOLVING SURVYES AND FORM FILL UP