//this is a program to find the greater number among 2 using user defined function
#include<stdio.h>
#include<conio.h>
int greater();
void main()
{
int max;
max=greater();
printf("\n\nGreater Among Two Numbers is %d",max);
}
int greater()
{
int a,b,max;
printf("\n\nEnter Any two numbers: ");
scanf("%d%d",&a,&b);
if(a>b)
max=a;
else
max=b;
return max;
}
#include<stdio.h>
#include<conio.h>
int greater();
void main()
{
int max;
max=greater();
printf("\n\nGreater Among Two Numbers is %d",max);
}
int greater()
{
int a,b,max;
printf("\n\nEnter Any two numbers: ");
scanf("%d%d",&a,&b);
if(a>b)
max=a;
else
max=b;
return max;
}