User:Ikosarakt1/Programs

C# program which computes up-arrow notation. using System;

namespace Up_arrow_notation {	class Program {		public static int UAN(int a, int b, int c)		{ if (b == 0) {				return 1; }			else if (c == 0) {				return a*b; }			else {				return UAN(a, UAN(a, b-1, c), c-1); }		}		public static void Main(string[] args) {			for (int i = 0; i < 10; i++) {				Console.WriteLine(UAN(3,i,1)); }			for (int i = 0; i < 5; i++) {

Console.WriteLine(UAN(2,i,2)); }			Console.WriteLine(UAN(4,2,2)); Console.ReadKey(true); }	} }