Write a program to find maximum between two given numbers

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);
}

Post a Comment

0 Comments