answersLogoWhite

0


Best Answer

int main()

{

int a=10,b=20;

while(a--)

b++;

printf("%d",b);

}

or: a -= -b;

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How a program in c that will add 2 numbers without using any plus operator?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

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


Write a program to divide 2 numbers without using the division operator?

int divide1(int a,int b) { int t=1; while(b*t<=a) { t++; } return t-1; }


How do you compare two numbers without using any operators in c?

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.


C program to find the largest among three numbers using ternary operator?

max = a > b ? a : b; max = max > c ? max : c;


How do you perform multiplication of two numbers without using the multiplication operator?

By using repeated addition. Consider two numbers a and b. If you want to find a*b then you can add the numbers repeatedly in a loop to get the product. Eg:product = a;for( i=1; i


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 write a c program to find biggest among two numbers using conditional operator?

int max (int a, int b) { return a>b?a:b; }


How do you define power function without using operator?

using pow() function.. ..


How can you download c compiler?

write a c program to fine largest/smallest of 3no (using ?:ternary operator/conditional operator)


Write a c program to find the product of two numbers without using operator?

#include<stdio.h> #include<conio.h> void main() { int a,b,multi; clrscr(); printf("enter a value for a and b"); scanf("%d%d",&a,&b); multi=a*b; printf("the result is %d", multi); getch() }


How to write a C program to find largest 2 numbers using pointers?

program to find maximum of two numbers using pointers


Write a program in C language to multiply any two numbers without using in source code?

The question is malformed and incomprehensible.