// $Id: ackermann.ici,v 1.0 2003/01/03 11:12:00 dada Exp $
// http://dada.perl.it/shootout
//
// contributed by Tim Long

static
Ack(M, N)
{
    return M ? (Ack(M - 1, N ? Ack(M, N - 1) : 1)) : N + 1;
}

n := argv[1] ? int(argv[1]) : 1;
printf("Ack(3,%d): %d\n", n, Ack(3, n));