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

What is the difference between 4x and x to the power of 4? Evaluate both of these expressions when x = 2.
A farmer tosses a rope over a beam at the top of a barn. He ties one end of the rope to a bale of hay. He then raises the bale up to the barn loft by pulling do
Which is not a characteristic of all circulatory systems? A. small, thin vessels called capillaries B. uses oxygen that ultimately comes from the surrounding
write 13/9 as a mixed number
the product of what number and 7 is less than 49
solve for x 9^(x+2)=1/27^(x+12)
why do you think writing is one of history's most important cultural advances
which body systems does not rely on the autonomic nervous system to stimulate involuntary events
who founded Delaware and why
At a restaurant after every 12th visit you receive a free drink. After every 15th visit you receive a free dessert. At which visit will you first receive a free