相关疑难解决方法(0)

如何使用'for循环'代替'while循环'

不得不使用while,do-while和for循环为在线java类编写以下程序.寻找一点解释.提前致谢!
PS虽然寻找参考书籍是Java还是Javascript?有关好的参考书的任何建议吗?我得到了这个概念,大多数情况下,魔鬼肯定在细节中.

public class ExamsFor {

    public static void main(String[] arguments) {


    int inputNumber; // One of the exams input by the user.
    int sum;     // The sum of the exams.
    int count;   // Number of exams.
    Double Avg;    // The average of the exams.


    /* Initialize the summation and counting variables. */

    sum = 0;
    count = 0;

    /* Read and process the user's input. */

    TextIO.put("Please enter the first exam: "); // get the first exam.


        inputNumber = …
Run Code Online (Sandbox Code Playgroud)

java

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

标签 统计

java ×1