Homework help

I need help how to start on this homework , it's harder for me because of the * symbol

http://postimg.org/image/8ylp91bcf/
Thanks
A simple if-else with condition to detect odd / even numbers placed in the right spot should do it.
1
2
3
4
5
6
7
8
if(x % 2) // True for x == 1, 3, 5, 7, 9, 11, ...
{
    // ...
}
else // true for x == 0, 2, 4, 6, 8, 10, ...
{
    // ...
}
Last edited on
Topic archived. No new replies allowed.