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

A person throws a tennis ball 6 m/s straight up. How long does it take for it to come back to their hand?
All dictionaries arrange the same information about words in the same way. True False Please ASAP
this spelling word has an s blend at the end
Identify the simple predicate in the following sentence. George Washington was one of the greatest generals in American history.
what is 13,952 rounded to
When a client wants to include whole-grain foods in his or her daily intake, a fitness professional could suggest A. fresh or frozen vegetables. B. fresh fruit
If p=5 what is the value of 6p-4?
(x - y)^2 + 4z(x - y) +3z^2 (and btw ^2 means squared and this is going for 10 points)
the product of w and 373
Sputnik is associated with