Write a program that accepts an integer limit and an integer value and that prints a complete
Question:
Write a program that accepts an integer limit and an integer value and that prints a complete line of output reporting the multiples of value uptil the limit.
Keep prompting the user for a value and display the multiples until the user presses 'n' or 'N' for No.
Notice that the multiples are separated by commas. You must exactly reproduce this format. The integer value entered must be greater than or equal to 1.
Hint: Use a for loop to calculate and display the multiples and a do while loop to repeat the program
Example output:
Welcome to the Multiples Program
Enter a number greater than or equal to 1: 3
How many multiples you would like to see : 5
The first 5 multiples of 3 are 3, 6, 9, 12, 15
Would you like to find multiples of another number ? Enter Y for yes and N for no :Y
Enter a number greater than or equal to 1: 7
How many multiples you would like to see : 3
The first 3 multiples of 7 are 7, 14, 21
Would you like to find multiples of another number ? Enter Y for yes and N for no :Y
Enter a number greater than or equal to 1: 0
Number must be greater or equal to 1 : 2
How many multiples you would like to see : 5
The first 5 multiples of 2 are 2, 4, 6, 8, 10
Would you like to find multiples of another number ? Enter Y for yes and N for no :N
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch