小编IR_*_*_KC的帖子

方法不会从数组中提取正确的数据

所以基本上发生了什么是我的代码编译并运行良好.但是当它运行时,为minScore和minName变量存储的值保持为0

static void Main(string[] args)
{
   int count = 0;
   string[] names = new string[MAX_SIZE];
   int[] scores = new int[MAX_SIZE];

   string name;
   int sum = 0;
   int minScore = 0;
   int maxScore = 0;
   string minName = string.Empty;
   string maxName = string.Empty;
   string input;
   int score;

   Console.WriteLine("===============Saturday Night Coders================");
   Console.WriteLine("===============Bowling Score Program================");

   for (int i = 0; i < MAX_SIZE; i++)
   {
      Console.WriteLine("\n Please Enter a name and a score separated by a space");
      Console.WriteLine("Enter a blank line when finished"); …
Run Code Online (Sandbox Code Playgroud)

c# arrays for-loop

0
推荐指数
1
解决办法
65
查看次数

标签 统计

arrays ×1

c# ×1

for-loop ×1