An algorithm to calculate even numbers between 0 and 9
Answers
Answered by
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
Business Studies,
5 hours ago
History,
5 hours ago
English,
5 hours ago
Computer Science,
9 hours ago
English,
9 hours ago
English,
8 months ago
English,
8 months ago