Answer to Question #264933 in Java | JSP | JSF for Yankuss

Question #264933

Write an application that counts by three from 3 through 300 inclusive, and that starts a new line after every multiple of 30 (30, 60, 90, and so on).

1
Expert's answer
2021-11-13T01:38:39-0500
public class Main
{
	public static void main(String[] args) {
	    for(int i=3;i<300;i+=3){
	        System.out.print(i+" ");
	        if(i%30==0){
	            System.out.println("\n");
	        }
	    }
		
	}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS