Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
right swastik
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_111 import java.util.Scanner; class Rextester { public static void main(String args[]) { Scanner in=new Scanner(System.in); int n=in.nextInt(); System.out.print("*"); for(int i=1;i<=n-2;i++) System.out.print(" "); for(int j=1;j<=n;j++) System.out.print("*"); System.out.println(); for(int k=1;k<=n;k++){ System.out.print("*"); for(int l=1;l<=n-2;l++) System.out.print(" "); System.out.print("*"); System.out.println(); } for(int m=1;m<=2*n;m++) System.out.print("*"); System.out.println(); for(int o=1;o<=n;o++){ for(int p=1;p<=n-1;p++) System.out.print(" "); System.out.print("*"); for(int q=1;q<=n-1;q++) System.out.print(" "); System.out.println("*"); } for(int r=1;r<=n;r++) System.out.print("*"); for(int s=1;s<=n-1;s++) System.out.print(" "); System.out.println("*"); System.out.println(); } }
run
|
edit
|
history
|
help
0
Jumpstatement
Leetcode 17. Letter Combinations of a Phone Number
Kochergina
1.6
dfkbzhfvjahfjh
Prime Factors
Magic No.
Abhay
Fibonacci numbers 0 - 93
moneda