Difference between revisions of "2022 Paper 1 Revision Quiz"
Line 23: | Line 23: | ||
{Look at this sample code: | {Look at this sample code: | ||
− | + | ||
− | public int Fact(int num) | + | public int Fact(int num) |
− | { | + | { |
if (num == 0) | if (num == 0) | ||
return 1; | return 1; | ||
Line 31: | Line 31: | ||
return num * Fact(num-1); | return num * Fact(num-1); | ||
− | } | + | } |
− | + | ||
|type="()"} | |type="()"} | ||
</quiz> | </quiz> |