Question: Write a Java program that takes a positive number up to 100 as a dividend and a positive number up to 10 as a

Write a Java program that takes a positive number up to 100

Write a Java program that takes a positive number up to 100 as a dividend and a positive number up to 10 as a divisor. All numbers from the dividend down to the divisor are then divided by the divisor. Only results without remainder are printed out. The program should continue until user enters 999 as input. An appropriate error message should be displayed if any negative number is entered as input. Example Runs Run1 Dividend (0-100, 999 to exit)? 35 Divisor? 7 35/7=5 28/7 = 4 21/7=3 14/7 = 2 7/7=1 Dividend (0-100, 999 to exit)? -4 Invalid input! Dividend (0-100, 999 to exit)? 45 Divisor? -7 Invalid input! Dividend (0-100, 999 to exit)? 999 Bye bye!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Here is a Java program that meets the requirements import javautilScanner public class DivisorFinder ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!