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: + + + + +
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
Comments
Leave a comment