subject

Public static int func2(int m, int n) {
if (n == 0)
return 0;
else
return m + func2(m, n - 1);
}
1. Which of the following statements about the code in the accompanying is always true?
a. func2(m, n) = func2(n, m) for m >= 0
b. func2(m, n) = m * n for n >= 0
c. func2(m, n) = m + n for n >= 0
d. func2(m, n) = n * m for m >= 0

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 20:10
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
question
Computers and Technology, 23.06.2019 03:30
How can you repin an image on your pinterest pin board a. click on the "repin" button b. click on the "add pin" button c. click on the "upload a pin" button d. click on the "save pin" button.
Answers: 2
question
Computers and Technology, 23.06.2019 08:00
The managing director of a company sends a christmas greeting to all his employees through the company email. which type of network does he use? he uses an .
Answers: 3
question
Computers and Technology, 23.06.2019 15:30
The processing of data in a computer involves the interplay between its various hardware components.
Answers: 1
You know the right answer?
Public static int func2(int m, int n) {
if (n == 0)
return 0;
else
retur...
Questions
question
Mathematics, 14.10.2019 13:10
question
Mathematics, 14.10.2019 13:10
question
Social Studies, 14.10.2019 13:10