-// $Id: ackermann.cs,v 1.1 2001/11/19 06:52:53 lupus Exp $
+// $Id$
// http://www.bagley.org/~doug/shootout/
public class ackermann {
- public static void Main() {
+ public static int Main(string[] args) {
int NUM = 8;
- Ack(3, NUM);
- return;
- //System.out.print("Ack(3," + NUM + "): " + Ack(3, NUM) + "\n");
+ if (args.Length > 0)
+ NUM = System.Int32.Parse (args [0]);
+ //return Ack(3, NUM) != 2045? 1: 0;
+ System.Console.WriteLine("Ack(3," + NUM + "): " + Ack(3, NUM));
+ return 0;
}
public static int Ack(int M, int N) {