004-001-010
Declaring and Creating Arrays
Easy
Problem Description
Declaring and Creating Arrays
In this problem, you will create a program that reads the number of elements N and each integer value from standard input, declares and creates an integer array, and displays each index with its corresponding value to standard output.
Learning Objective: Understand how to declare array variables and create array objects
Overview
Read N integers from standard input, declare and create an integer array, and output them.
Specifications
- Line 1: Number of elements N (1 ≤ N ≤ 10)
- Next N lines: Integer value for each element
- Declare and create an array, store the input values
- Output all elements in index: value format
Input Format
N
value0
value1
...
valueN-1
Output Format
Element 0: value0
Element 1: value1
...
Element N-1: valueN-1
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