Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class marinovauprajnenie {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- // top
- int n = scan.nextInt();
- int i = 0;
- while( i < n + 1 ) {
- System.out.print(".");
- i++;
- }
- i = 0;
- while (i < 2 * n + 1) {
- System.out.print("_");
- i++;
- }
- i = 0;
- while( i < n + 1 ) {
- System.out.print(".");
- i++;
- }
- System.out.println("");
- int LeftDots = n;
- int RightDots = n;
- int underscore = 2 * n - 1;
- int red = 0;
- while(red < n) {
- i = 0;
- while(i < LeftDots) {
- System.out.print(".");
- i++;
- }
- System.out.print("//");
- i = 0;
- while(i < underscore) {
- System.out.print("_");
- i++;
- }
- System.out.print("\\\\");
- i = 0;
- while(i < RightDots) {
- System.out.print(".");
- i++;
- }
- System.out.println();
- RightDots--;
- LeftDots--;
- underscore += 2;
- red++;
- }
- // STOP
- System.out.print("//");
- i = 0;
- while(i < (underscore - 5) / 2) {
- System.out.print("_");
- i++;
- }
- System.out.print("STOP!");
- i=0;
- while(i < (underscore - 5) / 2) {
- System.out.print("_");
- i++;
- }
- System.out.print("\\\\");
- System.out.println();
- // bot
- int Leftdots = 0;
- int Rightdots = 0;
- int Underscore = 4 * n - 1;
- int redove = 0;
- while(redove < n) {
- i = 0;
- while(i < Leftdots) {
- System.out.print(".");
- i++;
- }
- System.out.print("\\\\");
- i = 0;
- while(i < Underscore) {
- System.out.print("_");
- i++;
- }
- System.out.print("//");
- i = 0;
- while(i < Rightdots) {
- System.out.print(".");
- i++;
- }
- System.out.println();
- Rightdots++;
- Leftdots++;
- Underscore -= 2;
- redove++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement