My teacher made up his own problems, and I need help with 2 of them, I know absolutely nothing about Java loops.

First Problem.

Write a program that prompts the user to input an integer and...