answersLogoWhite

0


Best Answer

You cannot compare 2 numbers without using relational operators. Certainly, you could subtract them, but you still need to test the result, and that is a relational operator in itself.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

Not possible.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you compare two numbers without using any operators in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering
Related questions

How do you compare 2 numbers without using relational operators in c?

using max function


How a program in c that will add 2 numbers without using any operator?

Not possible. Let's not forget than in C the followings are all operators:+, -+=, -=++, --=&, *, []function-call


How do you find the greatest of two numbers without using the if-else comparison operators?

By subtracting any two of the numbers A-B , if the output number is negative , B IS GREAT and if its positive A is great


What does compare mean in programming?

It means exactly that. You compare values, using comparison operators such as '==', '<', and '>' (equal to, less than, and greater than respectively). For example; if (value1 > value2) { //Do something }


How do you swap two numbers without using third one using pointers?

How do you do. I am doing well thank you. Swap two number by using reference operators A tough assignment, it will make you think. I think you are confusing reference operators with pointers. Were I you I would study the section on pointers in your text book or course material.


How can you compare two fractions by using a number line?

convert numbers


How many of numbers from 1 to 9 can you create using only four 4'S?

All of them, but it does depend on what operators are allowed.


How do you find the greatest of two numbers without using the comparison operators?

void main() { float i,j; int a; printf("Enter two numbers : "); scanf("%f%f",&i&j); a=i/j; if(a) printf("%f is greater",i); else printf("%f is greater",j); }


How would you find wh ether a number is divisible by 9 without using any mathematical operators?

by 4


How do you find the greatest of three numbers using ternery operator?

Compare the first two numbers with the ternary operator. Store the result in a temporary variable. Compare the temporary variable with the third number, again using the ternary operator.


How do you decide when to compare numbers using ratios rather by finding the difference of the two numbers?

Finding the difference between two numbers involves rationalising them


How do you add without using numbers?

It is the same thing as adding without a yahoo id