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
What is structure in c definition?
WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER
Explain the difference between call by value and call by reference in c language?
In a header file whether functions are declared or defined?
What library is sizeof in c?
PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE
is it possible to create your own header files?
what are # pragma staments?
explain what is a newline escape sequence?
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
why do some people write if(0 == x) instead of if(x == 0)?
Explain the difference between strcpy() and memcpy() function?
What are the functions to open and close file in c language?
What is a good data structure to use for storing lines of text?
What is wrong with this statement? Myname = 'robin';