The sum of the first n natural number = n * (n+1) / 2, for n a natural number.
For example, you want to calculate the sum and average of any five numbers entered by the user. i.e., If you want to calculate the sum and average or percentage of multiple user-entered numbers, then please refer to the following program.
45 = (x) + (x + 1) + (x + 2)
45 = 3x + 3
- 3
42 = 3x
/3
14 = x
45 = 14 + (14 + 1) + (14 + 2)
45 = 14 + 15 + 16
The ages of the 3 friends are 14, 15, and 16.
The answer is 20/6 or 10/3
Answer:
7/12
Step-by-step explanation:
First you have to find a comnon demominator, which is 12.
Next, add them together.