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

How do you know that a bond between magnesium and chlorine will be ionic?
Is it legal in california to sell kittens before 8 weeks old?
solve each equation 42 + 6h = 84
The expression 3.25b + 2h gives the cost of b burgers and h hotdogs what is the cost of 4 burgers and 6 hotdogs
yo estoy 1st person 2nd person 3rd person singular plural
A certain solution has a hydrogen ion concentration of 0.025 m. what is the ph of this solution
To simplify 5.2 + 2.1(4.5 - 4 1/7 ), Josie argued that it would be easiest to rewrite the mixed number as a decimal since the other three numbers are decimals.
What is the desert tech project?
Read this passage: We walked together on the beach as the sun was setting. Every step we took left an imprint in the wet sand. Eventually, our steps were washed
Which of the following expressions are equal to the one below? Check all that apply 7 x (9-5) A.9 x 7-5 x 7 B.(7 x 9)-5 C.(9-5) x 7 D.7 x 9-7 x 5