Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
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(); for(int i=1;i<=n;i++) System.out.print("*"); for(int j=1;j<=n-1;j++) System.out.print(" "); System.out.println("*"); for(int k=1;k<=n;k++){ for(int l=1;l<=n-2;l++) System.out.print(" "); System.out.print(" *"); for(int m=1;m<=n-2;m++) System.out.print(" "); System.out.print(" *"); System.out.print("\n"); } for(int p=1;p<=(2*n);p++) System.out.print("*"); System.out.println(""); for(int o=1;o<=n;o++){ System.out.print("*"); for(int r=1;r<=n-2;r++) System.out.print(" "); System.out.print("*"); System.out.println(""); } System.out.print("*"); for(int s=1;s<=n-2;s++) System.out.print(" "); for(int t=1;t<=n;t++) System.out.print("*"); } }
run
|
edit
|
history
|
help
0
h
Queue implementation
BiseccionJava
teat2
Date and Time
Cola Machine
sfr
Hosteller.java
cuboid volume
call para cons