Write a recursive method that returns the factorial of an integer.

What will be an ideal response?

```
public int factorial(int n)
{
if(n == 0)
return 1;
else
return n*factorial(n-1);

}
```

Computer Science & Information Technology

You might also like to view...

In refining a floated layout, Cascading Style Sheets (CSS) support the _________ box model in which the width property is based on the sum of the content, padding, and border spaces and any space taken up by the padding and border is subtracted from space given to the content.?

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Eat the food

A. Customer B. Waitress C. Chef D. None of the above

Computer Science & Information Technology