Showing posts with label C programming. Show all posts
Showing posts with label C programming. Show all posts

Tuesday, May 26, 2009

How to add two numbers without using '+' operator?

So, You want add to add two numbers without using '+' operator.
Its very easy. Solution is given below:

void main()
{
int a=25, b=68;

while(b--)
a++;

printf("Addition of two nos. is %d", a);

}

How to add two numbers without using '+' operator?

So, You want add to add two numbers without using '+' operator.
Its very easy. Solution is given below:

void main()
{
int a=25, b=68;

while(b--)
a++;

printf("Addition of two nos. is %d", a);

}