answer.
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]
2 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]2 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
When should you exercise extreme caution around power lines?
Elis [28]

<em>You should take note and exercise extreme precautions when you are near power lines and consider the following: </em>

<em> </em>

<em>1. Make sure that you have a good distance away from the lines. The minimum distance you can get is 10 feet away from the lines. Be cautious as well when you see broken lines as they could still harm you and electrified you. </em>

<em>2. Do not make ladders, equipments and things around you touch the power lines as it may harm you as well. </em>

<em>3. Clear everything and ensure that no things are near you before you lift your hands and other tools.</em>

6 0
2 years ago
What are the three most common metals used in die casting?
Anit [1.1K]

Answer:

Aluminium,Copper,Magnesium

Explanation:

The three most common metal of die casting are as follows

1.Aluminium

2.Copper

3.Magnesium

Die casting is the process in which metal is forced in the die to produces the desired casting product.Generally two type of machines are used like cold chamber and hot chamber machining,it depends on the metals.Die casting produces simple shape of casting ,it can not use for complex casting.

3 0
2 years ago
A double-acting duplex pump with 6.5-in. liners, 2.5-in. rods, and 18-in. strokes was operated at 3,000 psig and 20 cycles/min.
Stella [2.4K]

Answer:

Pump factor = Fp =  7.854 gal/cycle

Ev = 82.00 %

P_H = 183.29 hp

Explanation:

Given data:

Dimension of duplex pump

6.5 inch liner  

2.5 inch rod

18 inch strokes

Pressure 3000 psig

Pit dimension

7 ft wide

20 ft long

Ls = 18 inch

Velocity = (18)/10

volumetric efficiency is given as E_v = (Actual flow rate)/(Theortical flow rate) * 100

we know that flow rate is given as = Area * velocity

Theoritical flow rate = \frac{\pi}{2}\times Ls(2d_l^2 - d_r^2)\times N

Ev = \frac{7\times 12 \times 20\times 12\times 12 \times \frac{18}{10} inch^3/min}{\frac{\pi}{2} \times 18 (2\times 6.5^2 -2.5^2) \times 20}

Ev = 82.00 %

Pump factor Fp = = \frac{\pi}{2}\times Ls(2d_l^2 - d_r^2)\times Ev

Fp =\frac{\pi}{2} \times 18 (2\times 6.5^2 -2.5^2) \times 0.82

Fp = 1814.22 in^3/cyl

Fp =  7.854 gal/cycle

Flow rate q = NFp = 20 \times 7.854 = 157.08 gal/min

Power Ph = \frac{\DeltaP q}{1714} = \frac{3000 \times 157.08}{1714} = 274.93 hp

6 0
2 years ago
Why is it important that ironworkers wait to begin work until after cement masons are finished with their job?
ziro4ka [17]

Answer:

Constructing a building's framework requires a solid foundation

is the answer

Explanation:

3 0
2 years ago
1. Consider a city of 10 square kilometers. A macro cellular system design divides the city up into square cells of 1 square kil
kakasveta [241]

Answer:

a) n = 1000\,users, b)\Delta t_{min} = \frac{1}{30}\,h, \Delta t_{max} = \frac{\sqrt{2} }{30}\,h, \Delta t_{mean} = \frac{1 + \sqrt{2} }{60}\,h, c) n = 10000000\,users, \Delta t_{min} = \frac{1}{3000}\,h, \Delta t_{max} = \frac{\sqrt{2} }{3000}\,h, \Delta t_{mean} = \frac{1 + \sqrt{2} }{6000}\,h

Explanation:

a) The total number of users that can be accomodated in the system is:

n = \frac{10\,km^{2}}{1\,\frac{km^{2}}{cell} }\cdot (100\,\frac{users}{cell} )

n = 1000\,users

b) The length of the side of each cell is:

l = \sqrt{1\,km^{2}}

l = 1\,km

Minimum time for traversing a cell is:

\Delta t_{min} = \frac{l}{v}

\Delta t_{min} = \frac{1\,km}{30\,\frac{km}{h} }

\Delta t_{min} = \frac{1}{30}\,h

The maximum time for traversing a cell is:

\Delta t_{max} = \frac{\sqrt{2}\cdot l }{v}

\Delta t_{max} = \frac{\sqrt{2} }{30}\,h

The approximate time is giving by the average of minimum and maximum times:

\Delta t_{mean} = \frac{1+\sqrt{2} }{2}\cdot\frac{l}{v}

\Delta t_{mean} = \frac{1 + \sqrt{2} }{60}\,h

c) The total number of users that can be accomodated in the system is:

n = \frac{10\times 10^{6}\,m^{2}}{100\,m^{2}}\cdot (100\,\frac{users}{cell} )

n = 10000000\,users

The length of each side of the cell is:

l = \sqrt{100\,m^{2}}

l = 10\,m

Minimum time for traversing a cell is:

\Delta t_{min} = \frac{l}{v}

\Delta t_{min} = \frac{0.01\,km}{30\,\frac{km}{h} }

\Delta t_{min} = \frac{1}{3000}\,h

The maximum time for traversing a cell is:

\Delta t_{max} = \frac{\sqrt{2}\cdot l }{v}

\Delta t_{max} = \frac{\sqrt{2} }{3000}\,h

The approximate time is giving by the average of minimum and maximum times:

\Delta t_{mean} = \frac{1+\sqrt{2} }{2}\cdot\frac{l}{v}

\Delta t_{mean} = \frac{1 + \sqrt{2} }{6000}\,h

8 0
2 years ago
Other questions:
  • Compute the mass fractions of α ferrite and cementite in pearlite. Assume T=726⁢ C∘.
    15·1 answer
  • 5. A typical paper clip weighs 0.59 g and consists of BCC iron. Calculate (a) the number of
    5·1 answer
  • Oil in an engine is being cooled by air in a cross-flow heat exchanger, where both fluids are unmixed. Oil (cp = 2000 J/kg. K) f
    12·1 answer
  • Derive an equation for the work of a mechanically reversible, isothermal compression of 1 mol of a gas from an initial pressure
    11·1 answer
  • A steam power plant operates on an ideal reheat- regenerative Rankine cycle and has a net power output of 80 MW. Steam enters th
    10·1 answer
  • A driver traveling at 65 mi/h rounds a curve on a level grade to see a truck overturned across the roadway at a distance of 350
    13·1 answer
  • 5 kg of steam contained within a piston-cylinder assembly undergoes an expansion from state 1, where the specific internal energ
    7·1 answer
  • Add a calculated field named AccountTime that calculates the number of days each client's accounts have been open. Assume today'
    6·1 answer
  • A rectangular beam having b=300 mm and d=575 mm, spans 5.5 m face to face of simple supports. It is reinforced for flexure with
    14·1 answer
  • When leveraging Artificial Intelligence (AI) in today's business landscape, which statement represents the data leveraged for so
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!