KiwiJelly5158 KiwiJelly5158
  • 24-12-2019
  • Computers and Technology
contestada

In a single statement: declare, create and initialize an array named a of ten elements of type int with the values of the elements (starting with the first) set to 10, 20, ..., 100 respectively.

Respuesta :

Debel
Debel Debel
  • 25-12-2019

Answer:

int[] a = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100};

Explanation:

//written in java

The left side int[] a Declare a variable(a) which is of type Integer array(int[]).

The equal sign(=) assign the right side to the left side.

The right side initialize the integer array(a) with ten element.

Answer Link

Otras preguntas

please help me........................................
21. Which statement below is true about Emperor Asoka? A He was a strong military leader and launched invasions on nearby countries. B. He became a Buddhist but
Mudslides have increased in Guatemala because of the interplay between natural soil erosion and the human behavior of:?
Type of government where the central government has all the power
HELP ME PLEASE!!!! 8(-4/7)
How many ink cartridges can you buy with 210 dollars if one cartridge cost 15 dollars?
​Which statement is true about groundwater as a drinking water supply? ​It comes from deep, protected underground aquifers. ​It is protected from new contamin
a 0.150 kg baseball has 118 j of KE. how fast is the ball moving?(unit=m/s)
Which statement best describes the conflict Perseus has with the king?A.Perseus feels challenged to prove his worth to the king. B. He fears the King's wrath wh
Which is not an effect of aging? A. hearing and vision become less sharp. B. skin becomes drier and less elastic C. bones shrink and become more brittl