Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Nose & Mouth */
- public static void noseAndMouth() {
- // the amount of decrease, which is increasing in each line.
- int iaod=0;
- // the variable to help the variable iaod.
- int hiaod=1;
- /* to repeat following 3 lines 2 times */
- for(int times=1; times<=2; times++) {
- for(int line=1; line<=3; line++) { // to print 3 lines
- /* the variable to find 1 in first line,
- 0 in second line, and 0 in third line */
- int mod = (line%3)%2;
- for(int spaces=1; spaces<=16; spaces++) {
- System.out.print(" ");
- }
- for(int spaces=0; spaces<=times-mod; spaces++) {
- System.out.print(" ");
- }
- for(int sharps=1; sharps<=2-mod; sharps++) {
- System.out.print("#");
- }
- for(int spaces=1; spaces<=2*mod+8-times; spaces++) {
- System.out.print(" ");
- }
- for(int sharps=1; sharps<=18-iaod; sharps++) {
- System.out.print("#");
- }
- for(int spaces=1; spaces<=7+iaod-2*hiaod; spaces++) {
- System.out.print(" ");
- }
- for(int sharps=1; sharps<=hiaod-1; sharps++) {
- System.out.print("#");
- }
- System.out.print(" ");
- System.out.print("##");
- iaod+=hiaod;
- hiaod+=1;
- System.out.println();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement