004-002-015
Array Creation: Double Array
Medium
Problem Description
array Creation: Double array
In this problem, you will create a program that creates a double array named prices with 5 elements, outputs the array length, and displays the default value of the first element to standard output.
Learning Objective: Understand how to create double arrays and check default values
Overview
Create a program that creates a double array for storing decimal numbers and outputs array information.
Specifications
- Create a double array named
prices(size: 5) - Output the array length
- Output the first element (index 0) value (to check default value)
Output Format
Array length: 5
First element: 0.0
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