Discuss / Java / 作业 5 / 1000

作业 5 / 1000

Topic source

Faraam法汉

#1 Created at ... [Delete] [Delete and Lock User]

(作业二)

public class Main {

    public static void main(String[] args) {

        int[] ns = { 1, 4, 9, 16, 25 };

        int sum = 0;

        for (int n : ns) {

            sum = sum + n;// TODO

        }

        System.out.println(sum); // 55

    }

}


  • 1

Reply