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
Degger [83]
3 years ago
5

Modify the CountByFives application so that the user enters the value to count by. Start each new line after 10 values have been

displayed. Save the file as CountByAnything.java.public class CountByFives{public static void main(String args[]){for (int i = 5; i <= 200; i = i + 5) {System.out.print(i+",");if (i % 50 == 0){System.out.println();}}}}
Engineering
1 answer:
marishachu [46]3 years ago
5 0

Answer:

import java.util.Scanner;

public class CountByAnything

{

  public static void main (String args[])

  {

      int beginning = 5;

      int ending = 200;

      Scanner s = new Scanner(System.in);

      System.out.println("Enter the value to count by:");

      int valueToCount = s.nextInt();

      int counter = 0;

      for(int i = beginning; i <= ending; i += valueToCount)

      {

          System.out.print(i + " ");

          if((counter+1) % 10 == 0)

              System.out.println();

          counter++;

      }

  }

}

Explanation:

  • Initialize the beginning and ending.
  • Loop through the value of ending variable.
  • Check if numbers per line is equal to ten  and Increment the counter .

         

You might be interested in
Realiza las siguientes conversiones.
amid [387]

Answer:

a) 4 hectómetros cuadrados equivalen a 400 decámetros cuadrados.

b) 21345 centímetros cuadrados equivalen a 2,135 metros cuadrados.

c) 0,592 kilómetros cuadrados equivalen a 592000 metros cuadrados.

d) 0,102 metros cuadrados equivalen a 1020 centímetros cuadrados.  

e) 23911 kilómetros cuadrados equivalen 2391100 hectómetros cuadrados.

Explanation:

a) <em>4 hectómetros cuadrados a decámetros cuadrados:</em>

Según las unidades de área y sus escalas utilizadas por el Sistema Internacional de Pesos y Medidas, un hectómetro cuadrado equivale a 100 decámetros cuadradps. Entonces, obtenemos el dato equivalente por la siguiente regla de tres simple:

x = 4\,Hm^{2}\times\frac{100\,Dm^{2}}{1\,Hm^{2}}

x = 400\,Dm^{2}

4 hectómetros cuadrados equivalen a 400 decámetros cuadrados.

b) <em>21345 centímetros cuadrados a metros cuadrados:</em>

Según las unidades de área y sus escalas utilizadas por el Sistema Internacional de Pesos y Medidas, un metro cuadrado equivale a 10000 centímetros cuadrados. Entonces, obtenemos el dato equivalente por la siguiente regla de tres simple:

x = 21345\,cm^{2}\times \frac{1\,m^{2}}{10000\,cm^{2}}

x = 2,135\,m^{2}

21345 centímetros cuadrados equivalen a 2,135 metros cuadrados.

c) <em>0,592 kilómetros cuadrados a metros cuadrados:</em>

Según las unidades de área y sus escalas utilizadas por el Sistema Internacional de Pesos y Medidas, un kilómetro cuadrado equivale a 1000000 metros cuadrados. Entonces, obtenemos el dato equivalente por la siguiente regla de tres simple:

x = 0,592\,km^{2}\times \frac{1000000\,m^{2}}{1\,km^{2}}

x = 592000\,m^{2}

0,592 kilómetros cuadrados equivalen a 592000 metros cuadrados.

d) <em>0,102 metros cuadrados a centímetros cuadrados:</em>

Según las unidades de área y sus escalas utilizadas por el Sistema Internacional de Pesos y Medidas, un metro cuadrado equivale a 10000 centímetros cuadrados. Entonces, obtenemos el dato equivalente por la siguiente regla de tres simple:

x = 0,102\,m^{2}\times \frac{10000\,cm^{2}}{1\,m^{2}}

x = 1020\,cm^{2}

0,102 metros cuadrados equivalen a 1020 centímetros cuadrados.

e) <em>23911 kilómetros cuadrados a hectómetros cuadrados:</em>

Según las unidades de área y sus escalas utilizadas por el Sistema Internacional de Pesos y Medidas, un kilómetro cuadrado equivale a 100 hectómetros cuadrados. Entonces, obtenemos el dato equivalente por la siguiente regla de tres simple:

x = 23911\,km^{2}\times \frac{100\,Hm^{2}}{1\,km^{2}}

x = 2391100\,Hm^{2}

23911 kilómetros cuadrados equivalen 2391100 hectómetros cuadrados.

7 0
4 years ago
The temperature at which all molecular motion stops is known as: a) Absolute temperature b) molecular temperature c) absolute ze
Naya [18.7K]

Answer:

c) absolute zero

Explanation:

The fourth principle of thermodynamics posed by the Romanian economist Nicholas Georgescu-Roegen, explains the presence of absolute zero is said that at this temperature the internal molecular movement becomes zero making the internal energy (U) zero, absolute zero is equivalent to -273.15C or 0Kelvin

6 0
3 years ago
A steel loop ABCD of length 5ft and of 3/8" diameter is placed as shown around a 1" diameter aluminum rod AC. Cables BE and DF e
lorasvet [3.4K]

Answer:

a

Explanation:

ye men thats the answer<em><u>#</u></em><em><u>#</u></em><em><u>#</u></em><em><u>#</u></em><em><u>#</u></em><em><u>#</u></em><em><u>#</u></em><em><u>%</u></em>

4 0
3 years ago
The hydrofoil boat has an A-36 steel propeller shaft that is 100 ft long. It is connected to an in-line diesel engine that deliv
Nataliya [291]

The question is incomplete. The complete question is :

The hydrofoil boat has an A-36 steel propeller shaft that is 100 ft long. It is connected to an in-line diesel engine that delivers a maximum power of 2590 hp and causes the shaft to rotate at 1700 rpm . If the outer diameter of the shaft is 8 in. and the wall thickness is $\frac{3}{8}$  in.

A) Determine the maximum shear stress developed in the shaft.

$\tau_{max}$ = ?

B) Also, what is the "wind up," or angle of twist in the shaft at full power?

$ \phi $ = ?

Solution :

Given :

Angular speed, ω = 1700 rpm

                              $ = 1700 \frac{\text{rev}}{\text{min}}\left(\frac{2 \pi \text{ rad}}{\text{rev}}\right) \frac{1 \text{ min}}{60 \ \text{s}}$

                              $= 56.67 \pi \text{ rad/s}$

Power $= 2590 \text{ hp} \left( \frac{550 \text{ ft. lb/s}}{1 \text{ hp}}\right)$

          = 1424500 ft. lb/s

Torque, $T = \frac{P}{\omega}$

                 $=\frac{1424500}{56.67 \pi}$

                 = 8001.27 lb.ft

A). Therefore, maximum shear stress is given by :

Applying the torsion formula

$\tau_{max} = \frac{T_c}{J}$

        $=\frac{8001.27 \times 12 \times 4}{\frac{\pi}{2}\left(4^2 - 3.625^4 \right)}$

      = 2.93 ksi

B). Angle of twist :

     $\phi = \frac{TL}{JG}$

         $=\frac{8001.27 \times 12 \times 100 \times 12}{\frac{\pi}{2}\left(4^4 - 3.625^4\right) \times 11 \times 10^3}$

         = 0.08002 rad

         = 4.58°

6 0
3 years ago
On a ship the price gift is 24 euros .What is the difference in the price on a day when the exchange rate is £1=2378
bija089 [108]

Answer:

The answer is "\$29.7072".

Explanation:

Please find the complete question in the attachment file.

As the original prices are 24 euros, \$ 1.2378 must be multiplied by 24.  

\to 1.2378 \times 24 = \$29.7072

Therefore the new price value will be \$ 29.7072

4 0
3 years ago
Other questions:
  • A rectangular beam of width b = 15 in., effective depth d = 20.5 in., and total depth h = 23 in. spans 18.5 ft. between simple s
    14·1 answer
  • The small washer is sliding down the cord OA. When it is at the midpoint, its speed is 28 m/s and its acceleration is 7 m/s 2 .
    13·1 answer
  • "An equal-tangent sag vertical curve connects a –1.5% initial grade and a +1.25% final grade. The design speed is 70 mi/h and th
    13·1 answer
  • Assuming the SELECT statement below is a proper query, which is true regarding the following statement?
    8·1 answer
  • An airplane tows a banner that is b = 0.8 m tall and ℓ = 25.0 m long at a speed of 150 km/hr. (a) If the drag coefficient based
    12·1 answer
  • An electric motor supplies 200 N·m of torque to a load. What is the mechanical power supplied to the load if the shaft speed is
    15·2 answers
  • A piece of corroded metal alloy plate was found in a submerged ocean vessel. It was estimated that the original area of the plat
    8·1 answer
  • Break lines may be drawn as
    14·1 answer
  • The main function of diversified investments is to:
    6·2 answers
  • What is the correct order for the first three steps of the engineering design process?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!