Created
January 5, 2019 10:26
-
-
Save ilhamarrouf/7fc8838480a3d4dc0b560465e2b1a78d to your computer and use it in GitHub Desktop.
Make square from length number
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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