Difference between revisions of "2022 Paper 1 Revision Quiz"
Line 67: | Line 67: | ||
− | { | + | {Look at this sample code: |
+ | |||
+ | <nowiki> | ||
+ | 1: public int Fact(int num) | ||
+ | 2: { | ||
+ | 3: if (num == 0) | ||
+ | 4: return 1; | ||
+ | 5: else | ||
+ | 6: return num * Fact(num-1); | ||
+ | 7: } | ||
+ | 8: | ||
+ | 9:Fact(5); | ||
+ | </nowiki> | ||
+ | The function Fact is run with the parameter of 5. | ||
|type="{}"} | |type="{}"} | ||
Name a famous Greek philosopher. | Name a famous Greek philosopher. | ||
{ Aristotle|Plato } | { Aristotle|Plato } | ||
</quiz> | </quiz> |