Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Pg 132 number 1 Project
- *
- * Zain Arfi
- * v1
- */
- public class Project1
- {
- public static void main(String[] args)
- {
- for(int row=1; row<=7; row++)
- {
- for(int star=1; star<=(row*-1+7); star++)
- {
- System.out.print("*");
- }
- for(int spaces=1; spaces<=(row-1); spaces++)
- {
- System.out.print(" ");
- }
- for(int fs=1; fs<=(row*-2+14); fs++)
- {
- System.out.print("/");
- }
- for(int bs=1; bs<=(row*2-2); bs++)
- {
- System.out.print("\\");
- }
- for(int spaces=1; spaces<=(row-1); spaces++)
- {
- System.out.print(" ");
- }
- for(int star=1; star<=(row*-1+7); star++)
- {
- System.out.print("*");
- }
- System.out.println();
- }
- }
- }
- /**
- Pg 132 number 2 Project
- *
- * Zain Arfi
- * v1
- */
- public class Project2
- {
- public static void main(String[]args)
- {
- System.out.println("+------+");
- for(int row=1; row<=6; row++)
- {
- System.out.println("|");
- for(int spaces=1; spaces<=(row*1+3); spaces++)
- {
- System.out.print(" ");
- }
- System.out.print("^");
- for(int spaces2=1; spaces2<=(row*2-2); spaces2 ++)
- {
- System.out.print(" ");
- }
- System.out.print("^");
- for(int spaces=1; spaces<=(row*1+3); spaces++)
- {
- System.out.print(" ");
- }
- System.out.print("|");
- System.out.println();
- System.out.println("+------+");
- System.out.println("|");
- for(int spaces3=1; spaces3<=(row-1); spaces3++)
- {
- System.out.print(" ");
- }
- System.out.print("V");
- for(int spaces4=1; spaces4<=(row*-2+6); spaces4++)
- {
- System.out.print(" ");
- }
- System.out.print("V");
- for(int spaces3=1; spaces3<=(row-1); spaces3++)
- {
- System.out.print(" ");
- }
- System.out.println("+------+");
- }
- }
- }
- /**
- * Pg 132 number 6 Project
- *
- * Zain Arfi
- * v1
- */
- public class Project6
- {
- public static void main(String[] args)
- {
- for(int row=1; row<=5; row++)
- {
- for(int spaces=1; spaces<=(row*-1+5); spaces++)
- {
- System.out.println(" ");
- }
- for(int slash=1; slash<=(row*1); slash++)
- {
- System.out.print("/");
- }
- System.out.print("**");
- for(int slash2=1; slash2<=(row*2); slash2++)
- {
- System.out.print("\\");
- }
- }
- System.out.println("+=*=*=*=*=*=*=+");
- for(int row2=1; row2<=6; row2++)
- {
- System.out.println("|");
- for(int dot=1; dot<=(row2*-1+3); dot++)
- {
- System.out.print(".");
- }
- for(int slashes=1; slashes<=(row2*1); slashes++)
- {
- System.out.print("/\\");
- }
- for(int dot2=1; dot2<=(row2*1-1); dot2++)
- {
- System.out.print(".");
- }
- for(int slashes=1; slashes<=(row2*1); slashes++)
- {
- System.out.print("/\\");
- }
- for(int dot=1; dot<=(row2*-1+3); dot++)
- {
- System.out.print(".");
- }
- System.out.print("|");
- }
- System.out.println("+=*=*=*=*=*=*=+");
- for(int row3=1; row3<=6; row3++)
- {
- System.out.println("|");
- for(int slashes2=1; slashes2<=(row3*-1+4); slashes2++)
- {
- System.out.print("\\/");
- }
- for(int dot2=1; dot2<=(row3*1-1); dot2++)
- {
- System.out.print(".");
- }
- for(int dot=1; dot<=(row3*-1+3); dot++)
- {
- System.out.print(".");
- }
- for(int slashes=1; slashes<=(row3*1); slashes++)
- {
- System.out.print("/\\");
- }
- for(int dot=1; dot<=(row3*-1+3); dot++)
- {
- System.out.print(".");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement