/* to read two nos and display greater one */
#include<stdio.h>
#include<stdlib.h>
int max(int,int);
int main()
{
int a,b;
printf("Enter two numbers: ");
scanf("%d%d",&a,&b);
printf("max=%d",max(a,b));
system("pause");
return 0;
}
int max(int a,int b)
{
return (a>b?a:b);
}
No comments:
Post a Comment