Computer Science, asked by dikshagulati5142, 5 months ago

weite a C++program to print first five even no.​

Answers

Answered by rsanjaykumar408
0

Answer:

For Even numbers:

Even number are numbers that are divisible by 2.

To print even numbers from 1 to N, traverse each number from 1.

Check if these numbers are divisible by 2.

If true, print that number.

For Odd numbers:

Odd number are numbers that are not divisible by 2.

To print Odd numbers from 1 to N, traverse each number from 1.

Check if these numbers are not divisible by 2.

If true, print that number

Similar questions