Public static int func2(int m, int n) {
if (n == 0)
return 0;
else
retur...
Computers and Technology, 27.02.2020 16:55, ladybugys
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
Answers: 1
Computers and Technology, 21.06.2019 18:30, dnjames01
Given the following code: if (n == 2) { k -= 2; } else if (n == 3) { k -= 3; } can be rewritten as: if (< condition > ) { < assignment statement > ; } assume that evaluating < condition > does not change the values stored in n and k. which of the following could be used as < assignment statement > ? k -= n; k -= 1; k -= 2; k += n; k = n - k;
Answers: 2
Computers and Technology, 23.06.2019 01:30, winstonbendariovvygn
1. which of the following is a search engine? a) mozilla firefox b)internet explorer c)google d)safari 2. which of the following statements is true? a) all search engines will provide the same results when you enter the same query. b) all search engines use the same amount of advertisements. c) some search engines are also browsers. d) search engines often provide different results, even when you enter the same query.
Answers: 2
Mathematics, 23.07.2020 23:01
Mathematics, 23.07.2020 23:01
English, 23.07.2020 23:01
Social Studies, 23.07.2020 23:01
Mathematics, 23.07.2020 23:01