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
Y_Kistochka [10]
3 years ago
5

I gave 15 min to finish this java program

Engineering
1 answer:
lisov135 [29]3 years ago
4 0

Answer:

class TriangleNumbers

{

public static void main (String[] args)

{

 for (int number = 1; number <= 10; ++number) {

  int sum = 1;

  System.out.print("1");

  for (int summed = 2; summed <= number; ++summed) {

   sum += summed;

   System.out.print(" + " + Integer.toString(summed));

  }

  System.out.print(" = " + Integer.toString(sum) + '\n');

 }

}

}

Explanation:

We need to run the code for each of the 10 lines. Each time we sum  numbers from 1 to n. We start with 1, then add numbers from 2 to n (and print the operation). At the end, we always print the equals sign, the sum and a newline character.

You might be interested in
A nozzle receives an ideal gas flow with a velocity of 25 m/s, and the exit at 100 kPa, 300 K velocity is 250 m/s. Determine the
Margaret [11]

Given Information:

Inlet velocity = Vin = 25 m/s

Exit velocity = Vout = 250 m/s

Exit Temperature = Tout = 300K

Exit Pressure = Pout = 100 kPa

Required Information:

Inlet Temperature of argon = ?

Inlet Temperature of helium = ?

Inlet Temperature of nitrogen = ?

Answer:

Inlet Temperature of argon = 360K

Inlet Temperature of helium = 306K

Inlet Temperature of nitrogen = 330K

Explanation:

Recall that the energy equation is given by

$ C_p(T_{in} - T_{out}) = \frac{1}{2} \times (V_{out}^2 - V_{in}^2) $

Where Cp is the specific heat constant of the gas.

Re-arranging the equation for inlet temperature

$ T_{in}  = \frac{1}{2} \times \frac{(V_{out}^2 - V_{in}^2)}{C_p}  + T_{out}$

For Argon Gas:

The specific heat constant of argon is given by (from ideal gas properties table)

C_p = 520 \:\: J/kg.K

So, the inlet temperature of argon is

$ T_{in}  = \frac{1}{2} \times \frac{(250^2 - 25^2)}{520}  + 300$

$ T_{in}  = \frac{1}{2} \times 119  + 300$

$ T_{in}  = 360K $

For Helium Gas:

The specific heat constant of helium is given by (from ideal gas properties table)

C_p = 5193 \:\: J/kg.K

So, the inlet temperature of helium is

$ T_{in}  = \frac{1}{2} \times \frac{(250^2 - 25^2)}{5193}  + 300$

$ T_{in}  = \frac{1}{2} \times 12  + 300$

$ T_{in}  = 306K $

For Nitrogen Gas:

The specific heat constant of nitrogen is given by (from ideal gas properties table)

C_p = 1039 \:\: J/kg.K

So, the inlet temperature of nitrogen is

$ T_{in}  = \frac{1}{2} \times \frac{(250^2 - 25^2)}{1039}  + 300$

$ T_{in}  = \frac{1}{2} \times 60  + 300$

$ T_{in}  = 330K $

Note: Answers are rounded to the nearest whole numbers.

5 0
3 years ago
A(n)___ branch circuit supplies two or more receptacles or outlets for lighting and appliances
Juli2301 [7.4K]

Answer: General purpose branch circuit

Explanation:

General purpose branch circuit are the type of circuits that are used mainly to supply light to two or more receptacle outlets for small appliances. This circuits are about 120v can be used either in residential, commercial and industrial buildings.

6 0
3 years ago
¿Cuándo se formarán cristales en una mezcla que se está evaporando?
Georgia [21]
Answer - La cristalización ye un procesu químicu pol cual a partir d'un gas, un líquidu o una disolución, los iones, átomos o molécules establecen enllaces hasta formar una rede cristalina, la unidá básica d'un cristal. La cristalización emplegar con bastante frecuencia en química para purificar una sustancia sólida.
5 0
3 years ago
The results of a _________ test will determine if there is suitable drainage and the size of the drain field that will be requir
topjm [15]

Answer:

The results of a percolation test will determine if there is suitable drainage and the size of the drain field that will be required for a septic system.

7 0
2 years ago
Which of the following tape measure techniques can be used to achieve accurate measurements? Choose all that apply.
zepelin [54]

Answer: Pull.

Because it's all about height width and Breadth!

5 0
3 years ago
Other questions:
  • What are the advantages of using 3D ink jet printing?
    10·1 answer
  • What are the weight restrictions for a small UAS, including everything onboard at the time
    12·1 answer
  • (TCO 1) Name one disadvantage of fixed-configuration switches over modular switches. a. Ease of management b. Port security b. F
    6·1 answer
  • The information on a can of pop indicates that the can contains 360 mL. The mass of a full can of pop is 0.369 kg, while an empt
    14·1 answer
  • Which type of Bridge is considered the strongest in both compression and tension?
    11·2 answers
  • Multilane roads use what to divide lanes of traffic moving in the same direction.
    14·2 answers
  • 2. What is the most obvious elements of design?<br> O color<br> O shape<br> O line<br> O texture
    11·1 answer
  • What is photosynthesis​
    9·2 answers
  • Jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
    12·2 answers
  • What is software certification? Discuss its importance in the changing scenario of software industry. ​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!