Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main {
- public static void main(String[] args) {
- Scanner sc =new Scanner(System.in);
- int x;
- System.out.println("Input number of bands:");
- x = sc.nextInt();
- for(int i = 1; i <= 5; i++){
- for(int j = 1; j <= x; j++){
- if(j%2==0)
- System.out.print("+++");
- else
- System.out.print("***");
- }
- System.out.println("");
- }
- }
- }
Add Comment
Please, Sign In to add comment