Hi guys I need to make a program that does stripes, checkerboard, and double diagonal. I can not get the stripes to work any suggestions?
import java.util.Scanner;
public class AsciiArt {
public static void main(String[] args){
int pattern;
Scanner input=new Scanner(System.in);
System.out.println("Choose one of the following patterns by pressing the corresponding number");
System.out.println("1) Stripes");
System.out.println("2) Chcker Board");
System.out.println("3) Double diagonal (aka the X)");
pattern=input.nextInt();
int number;
System.out.println("Input a size (must be larger than 1)");
number=input.nextInt();
if(pattern==1){
for(int i=1;i<=number;i++){
for(int j=1;j<=number;i++){
if(j%2==1){
System.out.print("*");
}
else{
System.out.print(" ");
}
System.out.println("");
}
}
}
}
}