Computer Science, asked by kumargulshan1541, 9 hours ago

An algorithm to calculate even numbers between 0 and 9

Answers

Answered by negipanma73
0

Answer:

Logic: Take first even integer as 2 and then keep adding 2 untill you reach upper boundary. eg: 2, 2+2,4+2,6+2,8+2,10+2,12+2….

/ Initialize n with 2 /

n=2

while n<100

n=n+2

print(n)

Similar questions