Earn while u Learn

Tips tweaks hacks on computer with C C++ VB tutorials and ways to earn money online

ad
Showing posts with label To find a greater number between two numbers in C. Show all posts
Showing posts with label To find a greater number between two numbers in C. Show all posts

To find a greater number between two numbers in C

This code will help you to find a greater number between two numbers in C
Code:
__________________________________________________________

#include(stdio.h)
#include(conio.h)
main()
{
int a,b;
printf("Enter a number\n");
scanf("%d",&a);
printf("Enter a number\n");
scanf("%d",&b);
if(a>b)
{
printf("%d is greater than %d\n",a,b);
}
else if(a,b)
{
printf("%d is less than %d\n",a,b);
}
else
{
printf("%d is equal to %d\n",a,b);
}
getch();
}
__________________________________________________________

Sign in / Join

Labels