class Program
{
public int tuzi(int yue)
{
int sum = 0;
if (yue==0)
{
sum = 1;
return sum;
}
sum = tuzi(yue - 1) * 2;
return sum;
}
static void Main(string[] args)
{
int sum = new Program().tuzi(3);
Console.WriteLine(sum);
Console.ReadLine();
}
}
时间: 2024-10-12 20:15:57