With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

Programming Exercises

 1: Write the pseudocode for an algorithm that determines the maximum number of two given numbers. Hint: Use the following logic: If number1 is greater than number2, number1 is the maximum number; otherwise, number2 is greater than or equal to number1. 2: Write the pseudocode for an algorithm that determines the maximum number in a given list of numbers. The list can contain any amount of numbers. Hint: Keep a variable called maxSoFar (written on the paper, with zero as the initial value). Go through the list one by one and compare each number with maxSoFar. Any number found to be greater than maxSoFar becomes equal to maxSoFar. At the end of the list, maxSoFar represents the largest number in the list. 3: Change the average-calculating ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

No credit card required