Largest No. Out Of Two Nos. Without Using Relational Operator or >,<,+,- In C Language
#include<stdio.h>
void main()
{
int a,b,c;
clrscr();
printf("\n Enter First No.:- ");
scanf("%d",&a);
printf("\n Enter Second No.:- ");
scanf("%d",&b);
c = a/b;
if(c==0)
printf("\n %d is greater.",b);
else
printf("\n %d is greater.",a);
getch();
}
This question was asked to me in an interview.
ReplyDelete