Difference between revisions of "2022 Paper 1 Revision Quiz"
Line 25: | Line 25: | ||
<nowiki> | <nowiki> | ||
− | + | 1: public int Fact(int num) | |
− | + | 2: { | |
− | + | 3: if (num == 0) | |
− | + | 4: return 1; | |
− | + | 5: else | |
− | + | 6: return num * Fact(num-1); | |
+ | 7: }</nowiki> | ||
− | + | Which of these lines are the General Case? | |
+ | |type="()"} | ||
+ | -3 | ||
+ | ||Incorrect | ||
+ | -4 | ||
+ | ||Incorrect | ||
+ | -5 | ||
+ | ||Incorrect | ||
+ | +6 | ||
+ | ||Correct | ||
− | |||
</quiz> | </quiz> |