添加Lesson3

This commit is contained in:
2025-10-11 11:21:51 +08:00
parent 921e096721
commit 6c30ef5c27
5 changed files with 143 additions and 0 deletions
@@ -0,0 +1,22 @@
using System.Collections;
namespace Lesson3_Queue练习题
{
internal class Program
{
static void Main(string[] args)
{
Queue q = new Queue();
for(int i = 0; i < 10; i++)
{
Console.WriteLine("请输入消息:");
q.Enqueue(Console.ReadLine());
}
for(int i = 0; i < 10; i++)
{
Thread.Sleep(1000);
Console.WriteLine(q.Dequeue());
}
}
}
}