004-002-007
Array Creation: Score Recording
Easy
Problem Description
Array Creation: Score Recording
Learning Objective: Create arrays using new operator and assign values to elements
Create a program to record scores in an array. Create an array with new and assign values to each element.
Input
Line 1: First score (integer)
Line 2: Second score (integer)
Line 3: Third score (integer)
Output
Scores:
[0]: [first score]
[1]: [second score]
[2]: [third score]
Examples
Example 1
Input:
85
90
78
Output:
Scores:
[0]: 85
[1]: 90
[2]: 78
Example 2
Input:
100
95
88
Output:
Scores:
[0]: 100
[1]: 95
[2]: 88
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
