Skip to content

Instantly share code, notes, and snippets.

@kryvoboker
Last active May 11, 2020 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kryvoboker/43fbfe605b3983b1d6eb3ff5ff2e0bc1 to your computer and use it in GitHub Desktop.
Save kryvoboker/43fbfe605b3983b1d6eb3ff5ff2e0bc1 to your computer and use it in GitHub Desktop.
HomeWork4
import java.util.Scanner;
/**
*
* @author kamaz
*/
public class Main {
public static void main(String [] args) {
Scanner sc = new Scanner(System.in); // Первое задание первого уровня
int number;
System.out.println("Input number");
number = sc.nextInt();
for (int i = 1; i <= number; i++) {
if (i == (number - 1)) {
break;
}
for (int j = 1; j <= number; j++) {
if (j % 2 == 0) {
System.out.print("***");
}
else {
System.out.print("+++");
}
}
System.out.println();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment