Synchronization of old projects

Part1
This commit is contained in:
2025-09-30 16:46:01 +08:00
parent 116b65164b
commit 4e1548abe2
167 changed files with 8668 additions and 43 deletions
+45
View File
@@ -0,0 +1,45 @@
using System;
namespace Lesson
{
class Program
{
#region
//递归函数 就是 让函数自己调用自己
//static void Fun()
//{
// Fun();
//}
//注意:这样会爆内存
//所以 一个正确的递归函数必须要包括下面的特点
//1.必须有结束调用的条件
//2.用于条件判断的 这个条件 必须改变 能够达到停止的目的
#endregion
#region
//用递归函数打印出0到10
static void Print(int a = 0)
{
Console.WriteLine(a);
a++;
if (a <= 10)
{
Print(a);
}
else
{
return;
}
}
#endregion
static void Main(string[] args)
{
Print();
}
}
}