The answer of a + b. A and b are both variabls which means that you only add the a and b to get your answer. Lets say you had this problem a(7h+13) you would put 7ah+13a because a goes first in the alphabet and since 13 doesn't have a letter it would be 7ah+13a.
2.5
B. the sum of the interests of its members.
1.Start 2. Input a,b,c 3. Sum = a+b+c 4. Average = sum/3 5. Output - Sum,Average 6. Stop
int sum = a + b; PS: a and b are int variables that must have been already declared and initialized.
If b is positive, then reduce each of a and b by subtracting 1, repeatedly until b is zero. If b is negative, repeatedly add 1 to both until b is zero. The final value of a is the result you ask for. If a and b are two integers, their sum is a+b, not a-b.
int mul (int a, int b) { int sum= 0; for (; b>0; --b) sum -= -a; for (; b<0; ++b) sum -= a; return sum; }
The sum of is the total of everything being summed; the sum total. Thus the sum of a, b and c is therefore a + b + c.
The sum of b and 8 would be written b+8 or 8+b(commutative property of addition)
To solve the sum and difference of two terms, you can use the identities for the sum and difference of squares. For two terms (a) and (b), the sum is expressed as (a + b) and the difference as (a - b). To find their product, you use the formula: ((a + b)(a - b) = a^2 - b^2). This allows you to calculate the difference of squares directly from the sum and difference of the terms.
(3+b)
(b+5)
b+11
/*use "c-free" compiler*/ #include <stdio.h> main() { int a,b,c; printf("enter the value of a & b"); scanf("%d%d",&a,&b); c=a+b; printf("sum of the two numbers is a+b- %d",c); getch(); }
Assuming that a and b are two non-negative numbers, then their sum is a + b and the difference is |a - b|.
#include<iostream> int main() { std::cout << "Enter value a: "; double a; std::cin >> a; std::cout << "Enter value b: "; double b; std::cin >> b; double sum {a+b}; std::cout << "a + b + (a + b) * (a + b) = " << sum + sum * sum << std::endl; }
3(a + b) + a = 3a + 3b + a = 4a + 3b
I suppose you wanted to ask: how to do multiplication with repeated addition. int mul (int a, int b) { int sum= 0; int sign= 1; if (b<0) { sign= -1; b= -b;} for (; b; --b) sum = sum + a; return sign*sum; }