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
Allisa [31]
3 years ago
10

Write an application that counts by five from 5 through 500 inclusive, and that starts a new line after every multiple of 50 (50

, 100, 150, and so on).
public class CountByFives {
public static void main (String args[]) {
// Write your code here
}
}
Computers and Technology
1 answer:
MArishka [77]3 years ago
5 0

Answer:

Replace the comment

//Write your code here

with

for(int i =5; i<=500;i++){

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

if(i%50 == 0){

System.out.println();

}

}

Explanation:

See attached for the full program

This line iterates from 5 to 500

for(int i =5; i<=500;i++){

This prints each digit

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

<em>The following if condition checks if current digit is a multiple of 5; if yes, a line is printed</em>

<em>if(i%50 == 0){</em>

<em>System.out.println();</em>

<em>}</em>

}

Download txt
You might be interested in
What is the best low end pc recording software​
julsineya [31]

Explanation:

democreator

D3DGear

nvidia shadow play etc

8 0
3 years ago
Read 2 more answers
To change the design of a query, right-click the query in the Navigation Pane and then click ____ on the shortcut menu.
Rama09 [41]
TO change the design of a query, right click the query in the Navigation Panel and the click "Design View" on the shortcut Menu. Design view tab is where you can make changes on your current design for your presentation,
7 0
3 years ago
You listened to a song on your computer. Did you use hardware, software, or both?
Bogdan [553]
The answer to your question is: <span>Explain- </span>
<span>The CPU, monitor, speaker or earphone, keyboard, mouse etc. that you can touch are hardware. </span>
<span>The software or program such as the operating system, windows media player, ms office, paint etc that you cannot touch actually but they are shown on the monitor are called software. </span>

<span># You play the music with Windows media player or any music player that means you are using software. And the software itself is showing on the monitor(hardware) that is run by CPU, another hardware. </span>

<span>Hope you got it.. Please give me brnliest.



</span>
7 0
3 years ago
Read 2 more answers
Whats a field in databases?
SVETLANKA909090 [29]
A field is a single attribute of an entity, object or event.
3 0
3 years ago
A(n) _____ chart is drawn on the same worksheet as the data.
svet-max [94.6K]
A is the answer because it makes more sense.............
5 0
3 years ago
Other questions:
  • Program planning for the best may include therapy, effective discipline strategies, crisis treatment, and/or family counseling.
    9·2 answers
  • Which tag will you use if you want your web page to look the same as your source code?
    11·1 answer
  • Create two algorithms for an everyday problem such as computing sales tax or figuring out the number of tables to seat guests. T
    10·1 answer
  • What do you think is the meaning of the saying "Sticks and stones may break my bones, but words can never hurt me"? Do think tha
    5·1 answer
  • What are possible challenges for cyber bullying
    6·2 answers
  • How many sections of a job description are there
    5·1 answer
  • Which one is not considered part of the cinematography team?
    7·2 answers
  • Anyone wanna teach me how to get better at Rocket League?
    7·2 answers
  • What type of program would you use to create a personal budget?
    11·1 answer
  • What is the purpose of protocols in data communications?.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!