C program to find maximum value out of 2 values
Program:
#include <stdio.h>
int maximum(int x, int y);
void main()
{
int a=10, b=20, max=0;
max=maximum(a,b);
printf("Maximum value is: %d",max);
}
int maximum(int x, int y)
{
if(x>y)
return x;
else
return y;
}
Output:
Maximum value is: 20
Drafted on 🌏 by,
Jal
☮
peace
Comments
Post a Comment