Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- int n = scan.nextInt();
- int score = 0;
- if (n > 4) {
- score = 4;
- }
- System.out.print("/");
- for( int i = 0 ; i < n / 2 ; i++ ) {
- System.out.print("*");
- }
- System.out.print("\\") ;
- for( int i = 0 ; i < score / 2 ; i++) {
- System.out.println("_");
- }
- System.out.print("/");
- for( int i = 0 ; i < n / 2 ; i++ ) {
- System.out.print("*");
- }
- System.out.print("\\") ;
- System.out.println();
- for (int i = 0 ; i < n - 3 ; i++) {
- System.out.print("|");
- for ( int j = 0 ; j < n * 2 - 2 ; j++) {
- System.out.print(" ");
- }
- System.out.print("|");
- System.out.println();
- }
- System.out.print("\\");
- for( int i = 0 ;i < n / 2 ; i++ ) {
- System.out.print("-");
- }
- System.out.print("/");
- for( int i = 0 ; i < score / 2 ; i++) {
- System.out.println("_");
- }
- System.out.print("\\");
- for( int i = 0 ;i < n / 2 ; i++ ) {
- System.out.print("-");
- }
- System.out.print("/");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement