QUESTION 1: Consider the task: “print n asterisks” where n is not negative. Which of the following is a valid recursive definition of this task? A) Keep printing asterisks until n of them have been printed. B) If n is greater than zero then print an asterisk and then “print n-1 asterisks”. C) Print an asterisk D) none of the above

LANGUAGE: JAVA

CHALLENGE:

QUESTION 1:

Consider the task: “print n asterisks” where n is not negative. Which of the following is a valid recursive definition of this task?

A) Keep printing asterisks until n of them have been printed.
B) If n is greater than zero then print an asterisk and then “print n-1 asterisks”.
C) Print an asterisk
D) none of the above

SOLUTION:

The Bad News: The content you are trying to access is only available to members.

The Good News: You too can be a member, simply Click Here.

Already a member?

Posted in ,