dhakalkd1 dhakalkd1
  • 16-01-2020
  • Computers and Technology
contestada

write an algorithm to display the even number from 2 to 20
​

Respuesta :

problemsolver2019
problemsolver2019 problemsolver2019
  • 23-01-2020

Answer:

Step 1: START

Step 2: For I = 2 to 20

Step 3: if I %2 == 0

Step 4: PRINT I

Step 5: I= I + 2

Step 6: NEXT I

Step 7: STOP

Explanation:

The output of the above algorithm will be

2 4 6 8 10 12 14 16 18 20

Above, we are using the for loop, and it starts with I =2, and with every iteration I is incremented by 2. And hence, we get the above output.

Answer Link

Otras preguntas

aye i need math help sos What is the correlation coefficient r for the data set? Enter your answer to the nearest hundredth in the box. r= x y 25 240 26 242
Help with 59 show work plz
A fix it business charges 40 dollars per hour or any fraction thereof. Write a step function for the costs up to 3 hours.
o que é matriz energética
Explain why the presence of "ghost nets" in the ocean is an important problem to solve
What are the three stages in the developments of cities? Describe each stage.
Why did North Ireland, Egypt, Trans-Jordan, Syria, and Palestine fight on the side of the Allies
These equations represent different possibilities for a waiter earning $11.25 for waiting on one table for one hour. The constant is the hourly rate and the coe
According to the u.s. constitution, who has the responsibility to fix the standard of weights and measures?
If you can answer this you are a true genius!