• Follow Us

Largest of two numbers program in C

Let’s have a look at C Program to Find the Largest of two numbers.

Largest of two numbers program in C

#include<stdio.h>
int main()
{
int a,b;
printf(“Enter the first number\n”);
scanf(“%d”,&a);
printf(“Enter the second number\n”);
scanf(“%d”,&b);
if(a>b)
printf(“1st is greater”);
else
printf(“2nd is greater”);
return 0;
}

Leave a Reply

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

Shopping cart