Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- import java.util.*;
- public class TemplateIO {
- public static void print (int n){
- for (int i = 0; i < n; i++) {
- for (int j = 0; j < n; j++) {
- out.print("*");
- }
- out.println();
- }
- }
- public void solve() throws IOException {
- int n = nextInt();
- print(n);
- }
- public void run() {
- try {
- br = new BufferedReader(new InputStreamReader(System.in));
- out = new PrintWriter(System.out);
- solve();
- out.close();
- } catch (IOException e) {
- e.printStackTrace();
- System.exit(1);
- }
- }
- BufferedReader br;
- StringTokenizer in;
- static PrintWriter out;
- public String nextToken() throws IOException {
- while (in == null || !in.hasMoreTokens()) {
- in = new StringTokenizer(br.readLine());
- }
- return in.nextToken();
- }
- public int nextInt() throws IOException {
- return Integer.parseInt(nextToken());
- }
- public double nextDouble() throws IOException {
- return Double.parseDouble(nextToken());
- }
- public long nextLong() throws IOException {
- return Long.parseLong(nextToken());
- }
- public static void main(String[] args) throws IOException {
- Locale.setDefault(Locale.US);
- new TemplateIO().run();
- }
- }
Add Comment
Please, Sign In to add comment