Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Created by Daniel on 3/9/2016.
- */
- public class ExtraCreditV2 {
- // v you can change the size of the shape v
- public static int size = 4; // change the value of size to scale up or down, 4 is the default value
- public static void main (String[] args)
- {
- //System.out.println(size); // test size
- line();
- top();
- bot();
- line();
- }
- public static void line ()
- {
- System.out.print("#");
- for (int i = 1; i <= size*4;i++)
- {
- System.out.print("=");
- }
- System.out.println("#");
- }
- // note - If you want to change the value of size, go to the start of the program
- public static void top()
- {
- for (int line = 1; line <= size; line++)
- {
- System.out.print("|");
- //change = -2,
- for (int j = 1; j <= line * -2 + size*2; j++)
- {
- System.out.print(" ");
- }
- System.out.print("<>");
- for (int j = 1; j <= line * 4 - 4; j++)
- {
- System.out.print(".");
- }
- System.out.print("<>");
- for (int j = 1; j <= line * -2 + size*2; j++)
- {
- System.out.print(" ");
- }
- System.out.println("|");
- }
- }
- // note - If you want to change the value of size, go to the start of the program
- public static void bot()
- {
- for (int line = 1; line <= size;line++)
- {
- System.out.print("|");
- for (int j = 1; j <= line * 2 - 2; j++ )
- {
- System.out.print(" ");
- }
- System.out.print("<>");
- for (int j = 1;j <= line * -4 + size*4;j++)
- {
- System.out.print(".");
- }
- System.out.print("<>");
- for (int j = 1; j <= line * 2 - 2 ; j++ )
- {
- System.out.print(" ");
- }
- System.out.println("|");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement