Question: Write a program that prints out the sum of the first 100 multiples of 5. Please note that you need to print out the
Write a program that prints out the sum of the first 100 multiples of 5. Please note that you need to print out the first 100 multiples of 5, your last number is not 100. As you can see from the example below 5 to 20 is only 4 multiples of 5. You need to use the "while" loop to generate your output (5 + 10 + 15 +20 +...) and final solution. Please don't do System.out.print ("5+10+15+20+25+..="); Sample Output: 5+10+15+20...=
Step by Step Solution
There are 3 Steps involved in it
code count 0 summultiples 0 multiple 5 while count 100 summultiples multiple multiple 5 count 1 p... View full answer
Get step-by-step solutions from verified subject matter experts
