To find maximum between two numbers, we have to compare both numbers using if.
#include<stdio.h>
void main()
{
int a, b;
printf("Enter two numbers");
scanf("%d %d", &a, &b);
if(a>b)
printf("Larger no. = %d", a);
else
printf("Larger no. = %d", b);
}
0 Comments