004-003-005

Array Element Access: Index Access

Easy

Problem Description

Array Element Access: Index Access

Learning Objective: Understand element access using array index

Input 5 integers and output the element at specified index.

Input

Lines 1-5: Integers to store in array (5 values)
Line 6: Index to retrieve (0-4)

Output

Element at [index]: [value]

Example

Input:

10
20
30
40
50
2
```java
Output:
```java
Element at 2: 30

Test Cases

※ Output examples follow programming industry standards

Input:
10
20
30
40
50
2
Expected Output:
Element at 2: 30
Input:
5
10
15
20
25
0
Expected Output:
Element at 0: 5
Input:
100
200
300
400
500
4
Expected Output:
Element at 4: 500
❌ Some tests failed
❌ エラー発生

Your Solution

Current Mode: My Code
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// Write your code here

sc.close();
}
}
0 B / 5 MB

You have 10 free executions remaining