How to create a two dimensional arrays that stored the score of 3 subjects of 2 semesters, and score will added by users and program should do

- Calculate the average scores of each semester

- The maximum score of each semester

- The mininum score of each semester

JUST COPY PAST TO ECLIPSE (OR WHATEVER ELSE U USE)

I KNOW THIS WAS POSTED LIKE A WEEK AFTER BUT I DID THIS MOSTLY TO PRACTICE, HOPE IT WAS USEFULL

import java.util.Scanner;

public class Array {

public static void main(String[] args) {


//JUST GETTING SOME INPUT FIRST
System.out.println("E- = 1\nE = 2\nE+ = 3\nD- = 4\nD = 5\nD+ = 6\nC- = 7\nC = 8\nC+ = 9\nB- = 10\nB = 11\nB+ = 12\nA- = 13\nA = 14\nA+ = 15");

Scanner scannerCommand = new Scanner(System.in);
System.out.println("\nPlease entre the First Semester grade of Subject 1 (as a number): ");
int fSemfSub = scannerCommand.nextInt();

System.out.println("\nPlease entre the First Semester grade of Subject 2 (as a number): ");
int fSemsSub = scannerCommand.nextInt();

System.out.println("\nPlease entre the First Semester grade of Subject 3 (as a number): ");
int fSemtSub = scannerCommand.nextInt();

//

System.out.println("\nPlease entre the Second Semester grade of Subject 1 (as a number): ");
int sSemfSub = scannerCommand.nextInt();

System.out.println("\nPlease entre the Second Semester grade of Subject 2 (as a number): ");
int sSemsSub = scannerCommand.nextInt();

System.out.println("\nPlease entre the Second Semester grade of Subject 3 (as a number): ");
int sSemtSub = scannerCommand.nextInt();


//NOW ONTO THE ARRAYS...
int results[][] = {
{0,0,0},
{0,0,0}
};

//Setting the scores to the array...
results[0][0] = fSemfSub;
results[0][1] = fSemsSub;
results[0][2] = fSemtSub;

results[1][0] = sSemfSub;
results[1][1] = sSemsSub;
results[1][2] = sSemtSub;

//Calculating the average scores per semester
int faverageSemOne = (results[0][0] + results[0][1] + results[0][2]);
int faverageSemTwo = (results[1][0] + results[1][1] + results[1][2]);

//Couldn't get the calculation to work on one line so I made it 2
int averageSemOne = faverageSemOne / 3;
int averageSemTwo = faverageSemTwo / 3;

System.out.println("The average score for semester one was " + averageSemOne);
System.out.println("The average score for semester two was " + averageSemTwo);

//Calculating the max and min score in semester one
int min, max;
min = max = results[0][0];

if(results[0][1] <= min){
min = results[0][1];
}
else{
max = results[0][1];
}

if(results[0][2] <= min){
min = results[0][2];
}
else{
if(results[0][2] >= max){
max = results[0][2];
}
}
System.out.println("The maximum score for Semester one was: " + max);
System.out.println("The minimum score for Semester one was: " + min);

//Calculating max and min score for semester two
min = max = results[1][0];

if(results[1][1] <= min){
min = results[1][1];
}
else{
max = results[1][1];
}

if(results[1][2] <= min){
min = results[1][2];
}
else{
if(results[1][2] >= max){
max = results[1][2];
}
}
System.out.println("The maximum score for Semester two was: " + max);
System.out.println("The minimum score for Semester two was: " + min);
}

}

Oh and ull need to format it, i don't think it will be formatted from here.

To create a two-dimensional array that stores the scores of 3 subjects for 2 semesters, you can use nested arrays. Here's an example in Python:

```python
# Create the empty two-dimensional array
scores = [[0] * 3 for _ in range(2)]

# Ask the user to input the scores
for semester in range(2):
print(f"Enter scores for Semester {semester+1}")
for subject in range(3):
score = int(input(f"Enter score for Subject {subject+1}: "))
scores[semester][subject] = score
```

Now that you have the scores stored in the `scores` array, you can calculate the average, maximum, and minimum scores for each semester.

To calculate the average score for each semester, you need to sum up all the scores for that semester and divide by the number of subjects.

```python
# Calculate the average scores for each semester
averages = []
for semester_scores in scores:
average = sum(semester_scores) / len(semester_scores)
averages.append(average)
```

To find the maximum score for each semester, you can use the built-in `max()` function and pass in the scores for that semester.

```python
# Find the maximum scores for each semester
maximums = []
for semester_scores in scores:
maximum = max(semester_scores)
maximums.append(maximum)
```

Similarly, you can use the `min()` function to find the minimum score for each semester.

```python
# Find the minimum scores for each semester
minimums = []
for semester_scores in scores:
minimum = min(semester_scores)
minimums.append(minimum)
```

Now you have three separate lists: `averages` containing the average scores for each semester, `maximums` containing the maximum scores for each semester, and `minimums` containing the minimum scores for each semester.

You can access the values for each semester by their index. For example, `averages[0]` would give you the average score for the first semester, `maximums[1]` would give you the maximum score for the second semester, and so on.