Q.no program to check which is greater between two numbers in c-programming?
main()
{
int a,b;
printf("enter two number");
scanf("%d %d",&a,&b);
if(a>b)
printf("%d is greater than %d",a,b);
else
printf("%d is greater than %d",b,a);
getch();
}
output:- a=5 and b=7
7 is greater than 5
No comments:
Post a Comment