Please Help! (Language=Java) This is due really soon and is from a beginner's computer science class!
Assignment details:
CHALLENGES
Prior to completing a challenge, insert a COMMENT with the appropriate number.
1) Get an integer from the keyboard, and print all the factors of that number. Example, using the number 24:
Factors of 24 >>> 1 2 3 4 6 8 12 24
2) A "cool number" is a number that has a remainder of 1 when divided by 3, 4, 5, and 6. Get an integer n from the keyboard and write the code to determine how many cool numbers exist from 1 to n. Use concatenation when printing the answer (shown for n of 5000).
There are 84 cool numbers up to 5000
3) Copy your code from the challenge above, then modify it to use a while loop instead of a for loop.
5) A "perfect number" is a number that equals the sum of its divisors (not including the number itself). For example, 6 is a perfect number (its divisors are 1, 2, and 3 >>> 1 + 2 + 3 == 6). Get an integer from the keyboard and write the code to determine if it is a perfect number.
6) Copy your code from the challenge above, then modify it to use a do-while loop instead of a for loop.