Not possible. Of course you can call a function which does the addition for you, but function-calling is also an operator in C.
Add two numbers.
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
Not possible. Let's not forget than in C the followings are all operators:+, -+=, -=++, --=&, *, []function-call
If you simply add numbers the answer is the sum of those numbers.
int main() { int a=10,b=20; while(a--) b++; printf("%d",b); } or: a -= -b;
Using the additive property (+).
The best method is to add the numbers, using arithmetic.
Operator overloading allows c/c++ operators to have user defined meanings on user defined types. For example + operator is used to add to numbers but we can also use it for concatenating a string the only limitation is you cannot change the literal meaning of the operator.
you ADD all the #s
You can make use of pointers to achieve this.void add( int *a, int *b){(*a) += (*b);}Now if two numbers a and b are given and you need to store the value in variable c, then you would perform:c = a;add(&c,&b);
add them all together and then divide the answer by the number of numbers.
first add the whole numbers then do simple fraction subtraction