Skip to content

Instantly share code, notes, and snippets.

@ilhamarrouf
Created January 5, 2019 10:26
Show Gist options
  • Save ilhamarrouf/7fc8838480a3d4dc0b560465e2b1a78d to your computer and use it in GitHub Desktop.
Save ilhamarrouf/7fc8838480a3d4dc0b560465e2b1a78d to your computer and use it in GitHub Desktop.
Make square from length number
import java.util.Scanner;
class MakeSquare {
public static void main(String args[]) {
Scanner reader = new Scanner(System.in);
int a, b, c;
System.out.print("Masukan angka = ");
a = Integer.parseInt(reader.nextLine());
for (b = 0; b < a; b++) {
for (c = 0; c < a; c++) {
System.out.print("*");
}
System.out.println("");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment