Ask Question
19 February, 22:35

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

+5
Answers (1)
  1. 20 February, 02:22
    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?
Get 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 & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers