Find the largest number from the given 2 numbers without using
any loops and the conditional operator.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / anji
We can compare two
values using unary
operators also
| Is This Answer Correct ? | 0 Yes | 0 No |
What is %s and %d in c?
What are shell structures used for?
Is this program statement valid? INT = 10.50;
Q. where is the below variables stored ? - volatile, static, register
Explain zero based addressing.
Is c weakly typed?
Why is not a pointer null after calling free?
The __________ attribute is used to announce variables based on definitions of columns in a table?
What does 3 mean in texting?
write an algorithm to display a square matrix.
What is the most efficient way to count the number of bits which are set in a value?
What is linear search?