Answer Posted / supri
see subtraction itself is the addition of the number with
its 2's complement....
add(int a,int b)
{
if(!a)
return b;
else
return(add((a&b)<<1,a^b));
}
main()
{
int a,b;
scanf("%d%d",&a,&b);
b=add(~b,1);
printf("%d",add(a,b));
return;
}
u can try this...
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
How can I avoid the abort, retry, fail messages?
What are the advantages of using linked list for tree construction?
differentiate built-in functions and user – defined functions.
Why we use int main and void main?
how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software
Is c easy to learn?
What is use of integral promotions in c?
Why do we need functions in c?
How does struct work in c?
Why is c faster?
What is a string?
Is null valid for pointers to functions?
Explain what are its uses in c programming?
What are the key features in c programming language?
Why do we use stdio h and conio h?