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
MITM can present in two forms: eavesdropping and manipulation. Discuss the process involved when an attacker is eavesdropping an
Nikitich [7]

Answer / Explanation:

Eavesdropping attack is also sometimes refereed to as sniffing attack. It is simply the process by which an attacker or hacker tries to penetrate very suddenly into an unaware individuals network or server with the intention to steal information transmitted over the network or server through that computer.  

To prevent such attack, there are several mean which include installing network monitoring software to check who else is connected to the network but the most common method of preventing such attack is to encrypt the Hypertext Transfer Protocol (http) and the way to do this is by securing it with a sort of security key.

On installing the security key, the network becomes encrypted and secured such that whatever network transmitted over the network becomes encrypted and unable to read. The protocol then converts to (https).

5 0
3 years ago
Write an expression that evaluates to true if the value of variable lastName is greater than the string Dexter.
gregori [183]

Answer:

lastName.compareTo("Dexter")>0

Explanation:

The expression that evaluates to true if the value of variable lastName is greater than the string Dexter is; lastName.compareTo("Dexter")>0.

4 0
3 years ago
An insulated 40 ft3 rigid tank contains air at 50 lbf/in2 and 120oF. A valve connected to the tank is now opened, and air is all
goldfiish [28.3K]

Answer:

The electrical work for the process is 256.54 Btu.

Explanation:

From the ideal gas equation:

n = PV/RT

n is the number of moles of air in the tank

P is initial pressure of air = 50 lbf/in^2 = 50 lbf/in^2 × 4.4482 N/1 lbf × (1 in/0.0254m)^2 = 344736.2 N/m^2

V is volume of the tank = 40 ft^3 = 40 ft^3 × (1 m/3.2808 ft)^3 = 1.133 m^3

T is initial temperature of air = 120 °F = (120-32)/1.8 + 273 = 321.9 K

R is gas constant = 8.314 J/mol.k

n = 344736.2×1.133/8.314×321.9 = 145.94 mol

The thermodynamic process is an isothermal process because the temperature is kept constant.

W = nRTln(P1/P2) = 145.94×8.314×321.9×ln(50/25) = 145.94×8.314×321.9×0.693 = 270669 J = 270669 J × 1 Btu/1055.06 J = 256.54 Btu

5 0
3 years ago
Read 2 more answers
Need help I’m giving out brainlest whoever get it me correct
ludmilkaskok [199]

Answer:

(C) Prototype Model

Explanation:

I'm sure that is the answer i am very sorry if not :)

7 0
3 years ago
Pleas im begging you. 100 points, will be marked brainliest. Make it a paragraph 5 senteneces
ki77a [65]

Answer: Ice melt is generally applied in advance of snow and ice or applied on top of the already formed ice and snow. Ice melt or deicer lowers the freezing point of water, preventing the buildup of ice or breaking up pre-formed ice into liquid slush. This layer absorbs some of the heat from the air and has a slight insulating effect on the remaining ice. When you melt an ice cube in a cup of water, it's exposed to both air and water. The part of the ice cube in the water melts faster than the ice in the air, but as the ice cube melts, it sinks further down. When ice or any other solid melts, its potential energy increases. Indeed, this is the only increase in energy, since the thermal kinetic energy, or temperature, does not increase while melting. At each phase change of water, whether ice to liquid water or liquid water to water vapor, the potential energy decreases.As glaciers melt, they add nutrients to the ocean and fertilize the local ecosystem. In Greenland and Antarctica, the ocean is short on iron, so melting glaciers make up for the lack of iron. Photosynthesizing phytoplankton are the base of the food web in the ocean and require lots of light and nutrients to grow.A

Explanation:

Byeeeeeee Remember to stan BTS , Wear Your Mask, And Drink Water

4 0
3 years ago
Read 2 more answers
Other questions:
  • Compute the strain-hardening exponent (n) for an alloy in which a true stress of 415 MPa produces a true strain of 0.10; assume
    10·1 answer
  • 5 cm circuit board dissipating 20 W of power uniformly is cooled by air, which approached the circuit board at 20C with a veloc
    10·1 answer
  • Consider a fully-clamped circular diaphragm poly-Si with a radius of 250 μm and a thickness of 4 μm. Assume that Young’s modulus
    14·1 answer
  • If the open circuit voltage of a circuit containing ideal sources and resistors is measured at 8 , while the current through the
    14·2 answers
  • LET'S DO THIS! Here are the directions whoever answers first will get the brainliest! I Promise!
    12·1 answer
  • An air-conditioner with refrigerant-134a as the working fluid is used to keep a room at 23°C by rejecting the waste heat to the
    15·1 answer
  • Mr. Ray deposited $200,000 in the Old and Third National Bank. If the bank pays 8% interest, how much will he have in the accoun
    10·2 answers
  • The aluminum rod (E1 = 68 GPa) is reinforced with the firmly bonded steel tube (E2 = 201 GPa). The diameter of the aluminum rod
    11·1 answer
  • What is the name of the type of rocker arm stud that does not require a valve adjustment?
    12·1 answer
  • Periodic lubrication and oil changes according to manufacturer’s recommendations extend the life of your vehicle, and allow you
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!