Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,19 @@
int ackermann(int m, int n) {
if (m == 0)
return n + 1;
else if (m > 0 && n == 0)
return ackermann(m - 1, 1);
else
return ackermann( m - 1, ackermann(m, n - 1) );
}
// Call function to produce output:
// the first 4x7 Ackermann numbers
void setup() {
for (int m=0; m<4; m++) {
for (int n=0; n<7; n++) {
print(ackermann(m, n), " ");
}
println();
}
}