The code should take integers from defined range e.g. 0-100 and process them as follows.
- If a number is divisible by 3, print “Global”
- If a number is divisible by 5, print “Logic”
- If a number is divisible by 3 AND by 5, print “GlobalLogic” in a single line
- Each printout should be done on a separate line.
Expected results:
Input | Output |
---|---|
0 | 0 |
1 | 1 |
2 | 2 |
3 | Global |
4 | 4 |
5 | Logic |
6 | Global |
7 | 7 |
8 | 8 |
9 | Global |
10 | Logic |
11 | 11 |
12 | Global |
13 | 13 |
14 | 14 |
15 | GlobalLogic |
... | ... |
100 | Logic |