1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nataly [62]
3 years ago
9

Write a program that declares an array alpha of 50 components of type double. Initialize the array so that the first 25 componen

ts are equal to the square of the index variable, and the last 25 components are equal to three times the index variable.
Engineering
1 answer:
tatiyna3 years ago
7 0

Answer:

The solution code is written in Java.

  1.        double [] alpha = new double[50];
  2.        for(int i =0; i < 25; i++){
  3.            alpha[i] = i * i;
  4.        }
  5.        for(int j = 25; j < 50; j++){
  6.            alpha[j] = j * 3;
  7.        }

Explanation:

Firstly, the syntax to declare an array variable <em>alpha</em> of type double and initialize it with 50 components is presented in Line 1.

Next, use a for-loop to traverse through the first 25 components (Line 3). Use * operator to multiply index variable by itself (to square it) and assign it to the current component of the<em> alpha</em> array (Line 4).

Create another for-loop to traverse through the last 25 components (Line 7). This time, multiply the index variable with 3 and assign it to the current component of the <em>alpha</em> array (Line 8).

You might be interested in
Most technician jobs in the field of metrology require a college degree. True or False?
Elanso [62]

Answer:

True

Explanation:

Because I Said

7 0
3 years ago
Read 2 more answers
La iluminación de la superficie de un patio amplio es 1600 lx cuando el ángulo de elevación del sol 53°. Calcular la iluminación
gregori [183]

Answer:

 I = 1205.69 Lx

Explanation:

The irradiation or intensity of the solar radiation on the earth is maximum for the vertical fire, with a value I₀

          I = I₀ sin θ

in this case with the initial data we can calculate the initial irradiance

         I₀ = \frac{I}{sin  \ \theta }

         I₀ = 1600 /sin 53

         I₀ = 2003.42 lx

for when the angle is θ = 37º

         I = 2003.42 sin 37

         I = 1205.69 Lx

6 0
3 years ago
A train travels 650 meters in 25 seconds. What is the train's velocity?
frosja888 [35]

The train is traveling 26 meters A second .

3 0
3 years ago
Technician A says that the definition of torque is how far the crankshaft twists in degrees.Technician B says that torque can re
leonid [27]
Technician B is correct because torque is a force of an object.
6 0
1 year ago
Who is responsible for conducting a hazard assessment?
slava [35]

Answer:

The Employee

Explanation:

Because it is there responsibility

5 0
3 years ago
Other questions:
  • A Michelson interferometer operating at a 500 nm wavelength has a 3.73-cm-long glass cell in one arm. To begin, the air is pumpe
    9·1 answer
  • Define various optical properties of engineering materials
    11·1 answer
  • Air enters a compressor operating at steady state at 176.4 lbf/in.^2, 260°F with a volumetric flow rate of 424 ft^3/min and exit
    10·1 answer
  • Finally you will implement the full Pegasos algorithm. You will be given the same feature matrix and labels array as you were gi
    12·1 answer
  • What is the t max for a carbon steel heater tube?
    8·1 answer
  • When will the entropy value of the universe attained its maximum value?
    13·1 answer
  • During a long run a very well-trained dog can use up to 1000 ‘cal’/hour (Note: Food calories differ by a factor of one thousand
    14·1 answer
  • Which is an alloy made up of iron and carbon and has high compressive and tensile strength?
    6·1 answer
  • Do you think the industrial revolution helped or hurt workers? Why?
    8·1 answer
  • . Which of the following formula is used for calculating current:
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!