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
you have a permanent magnet whit remanent induction. than you cut a piec of that magnet. if you put that piece back into permane
ELEN [110]
Yes, it will. The induction will be the same as long as it’s put back together.
5 0
4 years ago
QUESTION 6
Aloiza [94]
It would be 2 Portfolio
3 0
3 years ago
Explain the working principles of a rotary engine​
Brut [27]

Answer:

The rotary engine works on the same basic principle as the piston engine: combustion in the power plant releases energy to power the vehicle. However, the delivery system in the rotary engine is wholly unique. The piston engine performs four key operations: intake, compression, combustion, and exhaust.

Explanation:

7 0
3 years ago
A closed, rigid tank is filled with a gas modeled as an ideal gas, initially at 27°C and a gage pressure of 300 kPa. If the gas
ch4aika [34]

Answer:

gauge pressure is 133 kPa

Explanation:

given data

initial temperature T1 = 27°C = 300 K

gauge pressure = 300 kPa = 300 × 10³ Pa

atmospheric pressure = 1 atm

final temperature T2 = 77°C = 350 K

to find out

final pressure

solution

we know that gauge pressure is = absolute pressure - atmospheric pressure so

P (gauge ) = 300 × 10³ Pa - 1 × 10^{5} Pa

P (gauge ) = 2 × 10^{5} Pa

so from idea gas equation

\frac{P1*V1}{T1} = \frac{P2*V2}{T2}   ................1

so {P2} = \frac{P1*T2}{T1}

{P2} = \frac{2*10^5*350}{300}

P2 = 2.33 × 10^{5} Pa

so gauge pressure = absolute pressure - atmospheric pressure

gauge pressure = 2.33 × 10^{5}  - 1.0 × 10^{5}

gauge pressure = 1.33 × 10^{5} Pa

so gauge pressure is 133 kPa

4 0
3 years ago
What does the DHCP server configures for each host?
lidiya [134]

Answer: IP address

Explanation:

DHCP server automatically assigns an IP address and other information to each host on the network so they can communicate efficiently with other endpoints

8 0
4 years ago
Other questions:
  • A rubber wheel on a steel rim spins freely on a horizontal axle that is suspended by a fixed pivot at point P. When the wheel sp
    11·1 answer
  • Two kilograms of oxygen fills the cylinder of a piston-cylinder assembly. The initial volume and pressure are 2 m3 and 1 bar, re
    6·2 answers
  • If the compound swivel base is set on 60 degrees at the lathe centerline index, how many degrees will the reading be at the cros
    14·1 answer
  • A two-stage compression refrigeration system operates with refrigerant-134a between the pressure limits of 1.4 and 0.10 MPa. The
    6·1 answer
  • Block B starts from rest and moves downward with a constant acceleration. Knowing that after slider block A has moved 400 mm its
    13·1 answer
  • A 0.9% solution of NaCl is considered isotonic to mammalian cells. what molar concentration is this?
    10·1 answer
  • A local surf report provides the height of the wave from the trough to the crest of the wave. How does this relate to the wave’s
    11·1 answer
  • 13. What two major safety problems does hydrogen present?
    8·2 answers
  • tech a says that all wheels must be torqued to prevent wheels from loosening up and falling off. tech b says that all wheels mus
    7·1 answer
  • How do cars moves? and explain Please.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!