Interview Questions

  • View all interview questions
  • blank
  • Test divisors of three
    The question is as follows:
    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.

    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 need to be a premium member to see the rest of this question and code.

    Become a Premium Member

    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.

    “I got my App Academy acceptance yesterday, and Coderbyte was definitely a huge help.” ― Tomer
    • 200+ Coding Challenges
    • Mock Interview Questions
    • 500,000+ Code Solutions
    • Algorithm Tutorials
    • Interview Prep Courses
    mrdaniel published this on 12/14/15 | javascript, bootcamp, array, Fullstack Academy
    Comments
    Login to submit a comment