Write a java program that prompts the user to enter two integers, intLeft and intRight, taking into consideration that intRight should be greater than intLeft. The program should display all the numbers divisible by 5 and all the numbers divisible by 7 between intLeft and intRight exactly as displayed in the sample runs below:
Write a java program that prompts the user to enter two integers, intLeft and intRight, taking into consideration that intRight should be greater than intLeft. The program should display all the numbers divisible by 5 and all the numbers divisible by 7 between intLeft and intRight exactly as displayed in the sample runs below:
Sample Run 1:
Enter First Integer: 1
Enter Second Integer: 20
Numbers Divisible by 5 : 5, 10, 15, 20,
Numbers Divisible by 7 : 7, 14,
Sample Run 2:
Enter First Integer: 10
Enter Second Integer: 50
Numbers Divisible by 5 : 10, 15, 20, 25, 30, 35, 40, 45, 50,
Numbers Divisible by 7 : 14, 21, 28, 42, 49,
Sample Run 3:
Enter First Integer: 10
Enter Second Integer: 5
intRight should be greater than intLeft
Step by step
Solved in 3 steps with 3 images