Skip to content

Instantly share code, notes, and snippets.

@pepet96
Created February 13, 2014 03:30
Show Gist options
  • Save pepet96/8969278 to your computer and use it in GitHub Desktop.
Save pepet96/8969278 to your computer and use it in GitHub Desktop.
import java.util.Scanner;
public class asterisks {
public static void main (String [] args) {
Scanner input = new Scanner(System.in);
int params = input.nextInt();
square(params);
}
public static void square(int params){
for (int i = 0; i < params; i++){
for (int j = 0; j < params; j++){
System.out.print("*");
}
System.out.println();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment