Question: 1. This set of programs will sum 10 integers. a. Write a program named AddTenIntegersWhile.java that sums the first ten positive integers that are a
1. This set of programs will sum 10 integers. a. Write a program named AddTenIntegersWhile.java that sums the first ten positive integers that are a multiple of a number the user enters. You must use a While loop. First example: Enter an integer: 3 The sum of the first ten positive integers that are a multiple of 3 is: 165 Second example: Enter an integer: 7 The sum of the first ten positive integers that are a multiple of 7 is: 385 b. Rewrite the same program and name it AddTenIntegersFor.java. It will also sum the first ten positive integers that are a multiple of a number the user enters. You must use a for loop.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
