Archived
1
0

统一归档20260319

This commit is contained in:
2026-03-19 19:39:01 +08:00
parent 4e148364a9
commit 3ea0af246b
187 changed files with 5041 additions and 75005 deletions

32
CS/lab10/10_5/Program.cs Normal file
View File

@@ -0,0 +1,32 @@
using System.Text;
namespace _10_5
{
internal class Program
{
static void Main(string[] args)
{
StringBuilder sb = new StringBuilder();
bool bContinue = true;
while (bContinue)
{
Console.Write("请输入英文单词:");
string s =Console.ReadLine();
if (s != "")
{
sb.Append(s);
sb.Append(" ");
}
else
{
bContinue = false;
}
}
string str = sb.ToString();
Console.WriteLine("共{0}字符,内容为{1}",sb.Length,str);
string[] source = str.ToLower().Split(new char[] { '.', '?', '!', ':', '', '' }, StringSplitOptions.RemoveEmptyEntries);
Array.Sort(source);
foreach (string s in source) Console.WriteLine(s);
}
}
}