Thursday, December 25, 2008

A Program that will Find the Max Number among Two Numbers

#include
void main ()
{
int a, b, max;
printf ("Enter Two Number:\n");
scanf ("%d %d\n", &a, &b);
if (a>b)
{
max = a;
}
else
{
max = b;
}
printf ("Max of %d and %d is %d \n", a, b, max);
}

No comments: