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 01:00
Complete the sentence about a presentation delivery method
Answers: 2
question
Computers and Technology, 23.06.2019 21:40
language consists of basic components, and they are called a. 3; mental images, concepts, and speech b. 2; language acquisition and linguistic relativity c. 3; heuristics, algorithms, and analogies d. 4; phonemes, morphemes, syntax, and semantics e. 2; words and grammar
Answers: 3
question
Computers and Technology, 23.06.2019 22:20
If i uninstall nba 2k 19 from my ps4 will my career be gone forever?
Answers: 2
question
Computers and Technology, 24.06.2019 09:30
Atype of researcher who uses computers to make sense of complex digital data
Answers: 1
You know the right answer?
Recursive Programming Problem

Write a JAVA program that repeatedly prompts your user for...
Questions
question
English, 29.08.2021 22:50
question
Chemistry, 29.08.2021 22:50
question
Mathematics, 29.08.2021 22:50
question
Mathematics, 29.08.2021 22:50
question
Mathematics, 29.08.2021 22:50
Questions on the website: 13722363