I have a few loops that I need in my program. I can write out the pseudo code, but I\'m not entirely sure how to write them logically.
I need -
if (num is
For the first one:
if (x % 10 == 0)
will apply to:
10, 20, 30, .. 100 .. 1000 ...
For the second one:
if (((x-1) / 10) % 2 == 1)
will apply for:
11-20, 31-40, 51-60, ..
We basically first do x-1
to get:
10-19, 30-39, 50-59, ..
Then we divide them by 10
to get:
1, 3, 5, ..
So we check if this result is odd.