General Motors (GM) Interview Question

How would you approach implementing a program that outputs every other number between 1 and 20?

Interview Answer

Anonymous

Dec 1, 2017

initiate variable equal to 1, set up a loop that outputs the variable value and iterates by 2 until it evaluates to 20.