Remainder

Another “classic” programming interview question. The Question Given a numerator and denominator, calculate the remainder. The Answer The Trivial Way: This question is trivial if you use the modulus (%) operator. Simply read the user input, calculate and display the modulus and you are finished. I added one simply check to ensure … Continue reading

Maximum Value

Another “classic” programming interview question. The Question Given user input of a series of numbers, find the maximum value of said input. The Answer This question is simple if you understand the concept behind arrays (which you can see the basics of in the “Reverse a Sentence” post). The basic idea … Continue reading