Question: I am a complete beginner to java. I have to create a simple program using methods. The program will prompt the user for an int.
I am a complete beginner to java. I have to create a simple program using methods. The program will prompt the user for an int. Then I have to use a method to add all the integers, starting from 1 to up to and including the number entered. Once added, I have to print the sum of numbers up to that point.
I must create a scanner. The only outside methods I can use are Scanner methods and print methods. I cannot have more than one loop in the program. Lastly, I need to create a method separate from the main method. I must repeat this process three times so that the output looks something like this:

Thank you in advance!
Please enter an integer 5 15 Enter another number 10 Enter a third number 3 6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
