subject

Recursive Programming Problem

Write a JAVA program that repeatedly prompts your user for a number, uses a recursive function to calculate the product of that number times three (3), and displays the product. Select a sentinel value that allows your user to quit. Do NOT use the multiplication operator (*) in your proposed solution.

User Inputs Recursive Function Returns
-2 -6
-1 -3
0 0
1 3
2 6
3 9
4 12
Hint: Think of multiplication as a series of additions.

User Inputs Performs Returns
1 3 3
2 3 + 3 6
3 3 + 3 + 3 9
4 3 + 3 + 3 + 3 12

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 00:30
Which of the following would you find on a network
Answers: 3
question
Computers and Technology, 23.06.2019 06:00
When is a chart legend used a. all the time b. whenever you are comparing data that is the same c. whenever you are comparing multiple sets of data d. only for hand-drawn charts
Answers: 2
question
Computers and Technology, 23.06.2019 07:30
Which option allows you to view slides on the full computer screen?
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
What is the name of the sound effect that danny hears
Answers: 1
You know the right answer?
Recursive Programming Problem

Write a JAVA program that repeatedly prompts your user for...
Questions
question
English, 18.02.2022 08:00
question
Mathematics, 18.02.2022 08:00