DECLARE scores[5] OF INTEGER
FOR i FROM 0 TO 4
INPUT scores[i]
ENDFOR
scores = [0] * 5
for i in range(5):
scores[i] = int(input())
int[] scores = new int[5];
Scanner scanner = new Scanner(System.in);
for (int i = 0; i < 5; i++) {
scores[i] = scanner.nextInt();
}
Dim scores(5) As Integer
For i As Integer = 0 To 4
console.Writeline("Enter score: ")
scores(i) = Console.ReadLine())
Next
DECLARE scores[3][3] OF INTEGER
FOR i FROM 0 TO 2
FOR j FROM 0 TO 2
INPUT scores[i][j]
ENDFOR
ENDFOR
FOR i FROM 0 TO 2
FOR j FROM 0 TO 2
OUTPUT scores[i][j]
ENDFOR
ENDFOR
scores = [[0] * 3 for _ in range(3)]
for i in range(3):
for j in range(3):
scores[i][j] = int(input())
for i in range(3):
for j in range(3):
print(scores[i][j])
int[][] scores = new int[3][3];
Scanner scanner = new Scanner(System.in);
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
scores[i][j] = scanner.nextInt();
}
}
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
System.out.print(scores[i][j] + " ");
}
System.out.println();
}
Dim scores(2, 2) As Integer
For i As Integer = 0 To 2
For j As Integer = 0 To 2
Console.Writeline("Enter score: ")
scores(i, j) = Console.ReadLine())
Next
Next
For i As Integer = 0 To 2
For j As Integer = 0 To 2
Console.Write(scores(i, j) & " ")
Next
Console.WriteLine()
Next
92 docs|30 tests
|
|
Explore Courses for Year 11 exam
|