Computer Science, asked by kristencotanza23, 7 months ago

(Make an algorithm) - Print series 2,4,6,8.....40 as a output

Answers

Answered by bktbunu
1

Explanation:

input : Number of terms in the series as n

output : Series of n terms of even numbers

Algorithm:

1. Set first term of the series = a = 2

2. Set counter = 1

3. If counter <= n: then follow steps 4 to 7. Otherwise go to step 8

4. Print "a"

5. Increment a as a = a+1

6. Increment the counter as counter = counter+1

7. Go to step 3

8. Algorithm ends

Similar questions