Homework 05: Formulating Algorithms, Repetition Control Statements
Exercise 1
Write a Java program that computes the maximum of n numbers given by the user (use counter and sentinel approaches).
Exercise 2
Write a Java program that counts the number of divisors of a number given by the user.
Exercise 3
Write a Java program that determines whether a number given by the user is prime or not (use do/while).
Exercise 4
Write a Java program that prints the list of characters between two characters given by the user and supposed to be ordered.
Problem (class SumNonDuplicates)
Write a Java program that sums a series of numbers without duplicates. These numbers are supposed to be entered ordered by the user. The program will print the computed sum at the end and whether there are duplicates (in this case, print the number of duplicates) or not.