Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1.public class Project1
- {
- public static void main(String [] args)
- {
- for(int row=0; row<=6; row++)
- {
- for(int star1=1; star1<=-1*row+6; star1++)
- {
- System.out.print("*");
- }
- for(int blank1=1; blank1<=row+1; blank1++)
- {
- System.out.print(" ");
- }
- for(int fslash=1; fslash<=-2*row+12; fslash++)
- {
- System.out.print("/");
- }
- for(int bslash=0; bslash<=row*2;bslash++)
- {
- System.out.print("\\");
- }
- for(int blank2=1;blank2<=row+1;blank2++)
- {
- System.out.print(" ");
- }
- for(int star2=1; star2<=-1*row+6;star2++)
- {
- System.out.print("*");
- }
- System.out.println("");
- }
- }
- }
- 4.public class project4
- {
- public static void main(String[] args)
- {
- line();
- System.out.println("");
- top1();
- top2();
- line();
- }
- public static void line()
- {
- System.out.print("|\"\"\"\"\"\"\"\"\"\"|");
- }
- public static void top1()
- {
- for(int row=1; row<=4; row++)
- {
- for(int blank1=1; blank1<=row; blank1++)
- {
- System.out.print("");
- }
- System.out.print("\\");
- for(int dots=1; dots<=-2*row+10;dots++)
- {
- System.out.print(":");
- }
- System.out.print("/");
- System.out.println("");
- }
- }
- public static void top2()
- {
- for(int row=1; row<=4; row++)
- {
- System.out.print("/");
- for(int dots=1; dots<=2*row; dots++)
- {
- System.out.print(":");
- }
- System.out.print("\\");
- System.out.println("");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment