Question: Using JAVA and while loops only. Write a program that reads one positive integer N and prints all ODD ABUNDANT numbers between 1 and N.

Using JAVA and while loops only. Write a program that reads one positive integer N and prints all ODD ABUNDANT numbers between 1 and N. If the number N is ODD and ABUNDANT, the program will print N as well.

Example:

Input: 1000 Output: 945

Input: 2000 Output: 945, 1575

Input: 2205 Output: 945, 1575, 2205

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!