June 9, 2023
Program to use function find the larger number in C Language
#include <stdio.h>
int larger(int x, int y);
int main(void)
{
int x, y;
printf("Enter two number :");
scanf("%d %d", &x, &y);
printf("Larger number=%d\n", larger(x, y));
return 0;
}
int larger(int x, int y)
{
return x > y ? x : y;
}
Output
Enter two number :15
9
Larger number=15
by : Nadeem Khan
Quick Summary:
Program to use function find the larger number in C Language copy #include <stdio.h> int larger(int x, int y); int main(void) { int x, y; printf(“Enter two number :”); scanf(“%d %d”, &x, &y); printf(“Larger number=%d\n”, larger(x, y)); return 0; } int larger(int x, int y) { return x > y ? x : y; } […]