PROGRAM TO SHOW LARGEST OF TWO NUMBRS USING FUNCTIONS

/*PROGRAM TO SHOW LARGEST OF TWO NUMBRS USING FUNCTIONS*/
#include<stdio.h>
#include<conio.h>
void large(int,int);
void main()
{
int a,b;
clrscr();
printf(“Enter any two numbers: “);
scanf(“%d%d”,&a,&b);
large(a,b);
getch();
}
void large(int a,int b)
{
if(a>b)
printf(“%d is larger than %d”,a,b);
else if(b>a)
printf(“%d is larger than %d”,b,a);
else
printf(“Both numbers are equal”);
}

Leave a Reply

Your email address will not be published. Required fields are marked *