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 calloc in c?
a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above
How can I convert a number to a string?
Can a pointer be null?
what is a function method?give example?
Write a program to generate prime factors of a given integer?
how to find anagram without using string functions using only loops in c programming
program to find middle element of linklist?
WHAT IS PRE POSSESSORS?
What is uint8 in c?
What is main return c?
without using arithmatic operator convert an intger variable x into x+1