Ask Question
8 January, 18:02

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).

+1
Answers (1)
  1. 8 January, 20:53
    0
    We must create a cycle for to count 5 by 5 then a with a conditional if, we are going to identify every multiple of 50 to start in a new line.

    class Count{

    public static void main (String[] args) {

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

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

    if (i%50==0)

    System. out. println ();

    }

    }

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “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, ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers