首页 > 解决方案 > java中的多维数组-需要显示学生、分数、平均值等

问题描述

请帮忙; 我很困惑。我需要为我参加的课程制作一个多维数组,但进展并不顺利。这些是方向: 这些是方向

数组应该是什么样子的示例

这是我到目前为止的代码:

import java.util.Scanner;
public class Hw {
    public static void main(String args[]) {
    Scanner in = new Scanner(System.in);
    int numOfStudents;
    int assignments;
    int amtOfScores;
    int valueOfScores;
    System.out.println("Enter the number of students in the class: ");
    numOfStudents =  in.nextInt();
    System.out.println("Enter the number of assignments: ");
    assignments = in.nextInt();
    System.out.println("Enter the values of all of the exam scores:");
    valueOfScores = in.nextInt();
    amtOfScores = numOfStudents* assignments;
    }
}}

标签: javaarraysmultidimensional-array

解决方案


推荐阅读