Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
motifCatur
//'main' method must be in a class 'Rextester'. //openjdk version '11.0.5' import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { Scanner input = new Scanner(System.in); // System.out.print("Masukkan ukuran catur"); int size = input.nextInt(); cetakCatur(size); } public static void cetakCatur(int size) { for (int i=1; i<=size; i++){ for (int j=1; j<=size; j++){ if((i+j)%2 ==0){ System.out.print("#"); } else { System.out.print(" "); } } System.out.println(); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
toma!
else if statement
hello_world
LeetCode 121 - Best time to buy and sell stock - O(n) solution
test1
polymorphic mapper
2 dimensional array (filled in by the user)
Complex number multiplication (leetcode)
Stack implementation
MinMaxArray
Please log in to post a comment.