How do you write a program to take N numbers as input and output all even numbers from 1 to N inclusive, each on a new line. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do you write a program to take N numbers as input and output all even numbers from 1 to N inclusive, each on a new line.

May anyone help? I am confused with how you stop the loop at the input and how you valdate the num is even.

3rd Jan 2021, 7:22 PM
Jay Scott
Jay Scott - avatar
1 Answer
0
You should delete this question. It is duplicated and being answered here https://www.sololearn.com/Discuss/2652601/?ref=app
3rd Jan 2021, 8:16 PM
Brian
Brian - avatar