Answer to Question #245779 in Java | JSP | JSF for sandyJay

Question #245779

Write a Java Program that make use of a loop to output 10 plus signs.

Each plus sign must be separated by a space as shown in the example below: + + + + +


1
Expert's answer
2021-10-03T04:01:34-0400

Source code


public class Main
{
	public static void main(String[] args) {
		int n=10;
		for(int i=0;i<n;i++){
		    System.out.print("+ ");
		}
	}
}


Output



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