Java 无法找出逻辑错误

Java 无法找出逻辑错误,java,debugging,Java,Debugging,如果有人解释为什么不让while循环的控制转换为for循环的逻辑错误,我将不胜感激。您没有得到任何测试分数,因为您的for循环的条件是错误的。从一开始就是false,只有当条件为true时,循环才会循环。改变 How many testscores would you like to enter? 34 Please enter test scores that range from 0 to 100. How many testscores would you like to ent

如果有人解释为什么不让while循环的控制转换为for循环的逻辑错误,我将不胜感激。

您没有得到任何测试分数,因为您的
for
循环的条件是错误的。从一开始就是
false
,只有当条件为
true
时,循环才会循环。改变

    How many testscores would you like to enter?
34
Please enter test scores that range from 0 to 100.

How many testscores would you like to enter?
43
Please enter test scores that range from 0 to 100.

How many testscores would you like to enter?
3
Please enter test scores that range from 0 to 100.

How many testscores would you like to enter?

for(int i=0;i
    How many testscores would you like to enter?
34
Please enter test scores that range from 0 to 100.

How many testscores would you like to enter?
43
Please enter test scores that range from 0 to 100.

How many testscores would you like to enter?
3
Please enter test scores that range from 0 to 100.

How many testscores would you like to enter?
for(int i = 0; i == numberOfTestScores; i++)
for(int i = 0; i < numberOfTestScores; i++)