Interview Questions

Test divisors of three

The question is as follows:
## Example

If the function call is: test_divisors(2, 10) then the output should be:
2
3
"div3"
4
5
6
"div3"
7
8
9
"div3"
10
## Solution

You will be given 2 parameters: a low number, and high number. Your goal is to print all numbers between low and high, and for each of these numbers print whether or not the number is divisible by 3. If the number is divisible by 3, print the word "div3" directly after the number.

You need to be a premium member to see the rest of this question and code.

With our large collection of challengs, tutorials, and solutions, we make it easy for you to become a better coder, prepare for interviews, and learn new skills from more experienced coders.

- 200+ Coding Challenges
- Mock Interview Questions
- 500,000+ Code Solutions
- Algorithm Tutorials
- Interview Prep Courses

mrdaniel
published this on 12/14/15 **|**

Login to submit a comment