004-009-008
Accessing 2D Array Elements
Easy
Problem Description
Accessing 2D array Elements
In this problem, you will create a program that reads the array dimensions, values, and target indices from Scanner, then outputs the element at the specified position.
Learning Objective: Understand how to access specific elements in a 2D array
Overview
Read a 2D array and indices from standard input, then output the element at the specified position.
Input Format
rows cols
row0 elements (space-separated)
row1 elements (space-separated)
...
rowIndex colIndex
Output Format
[row][col]: value
Input Example
2 3
10 20 30
40 50 60
0 1
Output Example
[0][1]: 20
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
Sign Up