What is/are the simple case(s) of recursive function ten?
```
int ten (int n)
{
int ans;
if (n <= 0)
ans = 0;
else if (n % 5 == 0)
ans = n;
else if (n % 2 == 0)
ans = 1 + ten (n - 1);
else
ans = 1 + ten (n - 2);
return ans;
}
```
a. when n is negative
b. when n is divisible by 5
c. when n is even
d. cases a and b
e. cases a, b, and c
d. cases a and b
You might also like to view...
Answer the following statements true (T) or false (F)
1. A recursive function can only return a value of type int or double. 2. The code of a function can contain at most one recursive call. 3. For some problems one can specify more natural solutions using recursion than using iteration. 4. A simple case is an instance of a problem that has a straightforward solution that requires no redefinition of the problem. 5. A recursive function must have at least one input argument.
A large image of the active slide is displayed in the:
A) Notes pane. B) Navigation pane. C) Slide pane. D) thumbnails.
The Editing view of Word Online allows for modification of file contents and use of the editing tools on the Ribbon
Indicate whether the statement is true or false
What is the name of Microsoft's cloud server?
A. OneDrive B. Box C. Fileshare D. Cloudpoint