Lecture Notes on 17 Jun 2016 * Read Chapter 5 on Loops * Do Tutorial Exercises 5 due Sunday, 19 Jun 2016 * Review Boolean Identities, in particular use truth tables to prove De Morgan's Laws. * Loops // compute the maximum number from the series of numbers // entered by the user. // the input is terminated by a entry of any negative number import java.util.Scanner; Scanner sc = new Scanner (System.in); System.out.print ("Enter number: "); int num = sc.nextInt(); int max = num; while (num >= 0) { if (num > max) { max = num; } System.out.print ("Enter number: "); num = sc.nextInt(); } System.out.println ("Maximum number: " + max); * Challenge Problems Modify the above code to do the following problems: - find the minimum number - find the range, that is the difference between maximum and minimum - find the average of all the numbers - find the second highest number (assume that the user enters more than 2 numbers) - find the frequency of the maximum number - find the length of the longest sequence of numbers that are the same - find the largest difference between two adjacent numbers