rve/example/example.c

18 lines
190 B
C
Raw Normal View History

#include "printf.h"
int fact(int n) {
if (n == 0)
return 1;
return n * fact(n-1);
}
2024-12-06 22:40:52 +00:00
int main() {
int n = 8;
int res = fact(8);
printf("%d! = %d\n", n, res);
2024-12-06 22:40:52 +00:00
return 0;
}