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

Using a sample of young adolescents, dr. nguyen finds a correlation of .55 between scores on a measure of neglectful or uninvolved parenting and scores on a mea
The electronegativity of nitrogen (n) is 3.0, while the electronegativity of hydrogen (h) is 2.1. knowing this, consider how the electrons will be shared in amm
Need help with this problem? Tried to answer the problem
Find the final equilibrium temperature when 15.0 g of milk at 13.0 degrees c is added to 148 g of coffee with a temperature of 88.3 degrees c. assume the specif
What’s 0.563498 to 3 decimal place
each of the 8 cats in a pet store was weighed. here are their weigjts in pounds: 13,5,7,15,11,5,16,14. find the median and mean weights of these cats. if necess
What is the arm span of someone that is 60 inches tall?
5 sentence on importance of including vegetables in diet in hindi
The sum of 3 consecutive even numbers is 132
At a pond there were 24 ducks swimming. The ratio of ducklings to adult ducks is 5:1. How many ducklings were swimming at the pond?