Computer Science, asked by isgu1201, 1 year ago

Algorithm to find out sum of first 100 even numbers

Answers

Answered by Anonymous
2

The formula used to compute the sum of a series of even numbers is n/2 (2a +(n - 1)d)

where

a is the first term of the series

n is the total number of terms in the series

d is the common difference or the difference between the terms

The algorithm to find the sum of the first 100 even numbers is written taking the above formula into consideration.

Step 1: Start the process.

Step 2: Let the value of the desired sum be assigned to S.

Step 3: Calculate the value of S as 50/2 (2*2+(50-1)*2).

Step 4: Print the value of S.

Step 5: Stop the process.

Similar questions