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 to find greatest common factor  45 and 81
How to find greatest common factor  45 and 81
The message of the DNA Code is information for building_______.
How did geographic features influence the Louisiana purchase and the monroe doctrine?
How did geographic features influence the Louisiana purchase and the monroe doctrine?
What values can n have to make each equation true |n|=3 and |n|=14 |n|=1
what is the Volcanic Intrusion "rule"-
Ms groves had trays of paint each tray has five colors one of the colors is purple.what fraction of the colors in 20 trays is purple
Ms groves had trays of paint each tray has five colors one of the colors is purple.what fraction of the colors in 20 trays is purple
What is the length of the earth's crust? Oceanic and Continental.