|
-
Feb 19th, 2002, 05:51 AM
#1
Thread Starter
Junior Member
Logic Required
hi!
actually,i want to write a program in C.the specifications are as below:-
1. Input should be a two digit number(say ab)
2. If a>b then Output -1
3. If a<b then Output +1
4. If a==b then Output 0
5. But we have not to use divide(/) or modulo(%) operator.
6. I think,by using bitwise operators,we may get our goal.But
HOW?
Please give logic behind it??????????????
regards
Rohit..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|