Archived
1
0
This commit is contained in:
2025-11-01 08:20:49 +08:00
Unverified
parent e0fbc20716
commit 6151e4f8c9
29 changed files with 1010 additions and 3 deletions

36
cs4/CS4_2/Program.cs Normal file
View File

@@ -0,0 +1,36 @@
using System;
namespace CS4_2
{
public class Program
{
static void Main(string[] args)
{
int[] score = { 80, 90, 67, 89, 78, 85, 45, 65, 77, 95 };
// 统计分数段
int a = 0, b = 0, c = 0, d = 0;
for (int i = 0; i < score.Length; i++)
{
if (score[i] >= 90)
{
a++;
}
else if (score[i] >= 80)
{
b++;
}
else if (score[i] >= 60)
{
c++;
}
else
{
d++;
}
}
Console.WriteLine("90分及以上人数" + a);
Console.WriteLine("80-89分人数" + b);
Console.WriteLine("60-79分人数" + c);
Console.WriteLine("60分以下人数" + d);
}
}
}