Question: Inside of the class, Asg1Part2, write a main method that computes the sum of the numbers from 1 to 100. Print that sum with a
- Inside of the class, Asg1Part2, write a main method that computes the sum of the numbers from 1 to 100. Print that sum with a message.
- Run the main method (run class Asg1Part2). Check that the output is correct.
- Inside of class Asg1Part2, add additional code to the main method to ALSO compute the sum of the numbers from 1 to 2000 that are evenly divisible by 13. Print that sum with a message.
- Run the class Asg1Part2 (main method in that class). Check that the output is correct.
- Add more code to the main method in class Asg1Part2, to compute the "sum of the squares" of all the numbers from 1 to 50, i.e. 1*1 + 2*2 + 3*3 + ... +50*50. Print the sum with a message. (note, do not print a running sum, just the final sum).
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
