mardi 23 avril 2019

How to print odd/even series without if-statement

I'm writing program to list odd/even series from n elements (1,2,...n) using if-statement. For example,

n = 1

Odd Series
1
3
5
7
9

Even Series
0
2
4
6
8

If any possible to print odd/even series without if-statement.

Aucun commentaire:

Enregistrer un commentaire