add example from slides

This commit is contained in:
Mylloon 2022-12-14 00:19:26 +01:00
parent 314286bf1e
commit 8bb03f9dc8
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

17
tests/27_boom.test Normal file
View file

@ -0,0 +1,17 @@
void countdown (int n) {
if (n != 0) {
puti(n);
puts("\n");
countdown(n - 1);
}
else {
puts("BOUM!\n");
}
}
int main () {
puts("Count from? ");
countdown(geti());
return 0;
}