Find the largest number from the given 2 numbers without using
any loops and the conditional operator.
Answer Posted / surya
if(!(a/b)) // if a is less than b then division result will be zero.
02
{
03
cout << " b is greater than a";
04
}
05
else if (!(a-b)) // we know a is greater than or equal to b now. check whether they are equal.
06
{
07
cout << "a and b are equal";
08
}
09
else
10
cout << "a is greater than b";
Is This Answer Correct ? | 9 Yes | 6 No |
Post New Answer View All Answers
Which driver is a pure java driver
What is the best style for code layout in c?
Why functions are used in c?
What are the rules for the identifier?
What is type qualifiers?
How do I send escape sequences to control a terminal or other device?
Write the syntax and purpose of a switch statement in C.
What is an lvalue?
How does placing some code lines between the comment symbol help in debugging the code?
Why is %d used in c?
shorting algorithmS
I came across some code that puts a (void) cast before each call to printf. Why?
What is I ++ in c programming?
program to convert a integer to string in c language'
What does char * * argv mean in c?