Find the greatest between two numbers using 'c'.
(Click on read more to get the full code)
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter two numbers:");
scanf("%d%d",&a,&b);
if(a>b){
printf("%d is greater",a);
}
else{
printf("%d is greater",b);
}
getch();
}
OUTPUT:
Enter two numbers:4
8
8 is greater
Comments
Post a Comment