Gurobi Systems Developer evaluation
Background
This is designed to be a simple check that the Gurobi Systems Developer position is a good fit for you. You may use any of the top-10 languages in the TIOBE Index (http://www.tiobe.com/tiobe-index/). You will be evaluated based on correctness and readability of your code. Please keep things simple:
- Use console input and output (standard input/output)
- Use built-in data structures – don’t use a database, XML files, etc.
An experienced programmer should be able to complete this in a few minutes; please contact us if the question is not clear or you think it will take significantly longer to complete it. When finished, email your source code to sysdev2017@gurobi.com.
Question
Write a program that loops from 1 to 40 and prints the following:
- If the number is a multiple of 2, print “GU”
- If the number is a multiple of 3, print “RO”
- If the number is a multiple of 5, print “BI”
- If the number is a combination, print the combination (ex: for 6, print “GURO”)
- If the number is not a multiple of 2, 3 or 5, print the number
Sample output:
1 GU RO GU BI GURO 7 GU RO GUBI