108k views
2 votes
Write an algorithm and corresponding flowchart for a program that prints multiple of 5 starting with 100 and ending with 180.

User MayuriXx
by
4.7k points

1 Answer

5 votes

Answer:

The pseudocode is as follows:

1. Start

2. total = 0

3. for i = 100 to 180 step 5

3.1 total = total + i

4. print total

5. Stop

Step-by-step explanation:

This begins the algorithm

1. Start

This initializes the total to 0

2. total = 0

This iterates from 100 to 180 with an increment of 5

3. for i = 100 to 180 step 5

This adds up all multiples of 5 within the above range

3.1 total = total + i

This prints the calculates total

4. print total

This ends the algorithm

5. Stop

See attachment for flowchart

Write an algorithm and corresponding flowchart for a program that prints multiple-example-1
User Andriy Tolstoy
by
4.6k points