Asked by michelle bartels
Create the logic for a program that continuously prompts a user
for a numeric value until the user enters 0. The application passes the value in turn to a method that
computes the sum of all the whole numbers from 1 up to and
including the entered number. Example if the number entered is
4 the displayed value would be 10 (1+2+3+4).
Also to a method that computes the product of all the whole
numbers up to and including the entered number. Example if
the number entered is 4 the displayed value would be 24
(1*2*3*4).
for a numeric value until the user enters 0. The application passes the value in turn to a method that
computes the sum of all the whole numbers from 1 up to and
including the entered number. Example if the number entered is
4 the displayed value would be 10 (1+2+3+4).
Also to a method that computes the product of all the whole
numbers up to and including the entered number. Example if
the number entered is 4 the displayed value would be 24
(1*2*3*4).
Answers
There are no human answers yet.
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.