Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* MyFirstProgram.java - Simple Integer and Double Math
- * Author: Collin Johnson
- * Date: Week 1
- * Project: Project 2
- * Problem Statement: Make a pretty picture
- *
- * Algorithm: print a smiley face
- */
- public class PrintPicture
- {
- public static void main(String[] args)
- {
- //with newline
- System.out.println (" ***** \n" +
- " * * * *\n" +
- "* *\n" +
- "* * *\n" +
- "* *\n" +
- "* * * *\n" +
- "* *** *\n" +
- " * *\n" +
- " ***\n\n") ;
- //separated
- System.out.println (" ***** ") ;
- System.out.println (" * * * *") ;
- System.out.println ("* *") ;
- System.out.println ("* * *") ;
- System.out.println ("* *") ;
- System.out.println ("* * * *") ;
- System.out.println ("* *** *") ;
- System.out.println (" * *") ;
- System.out.println (" ***") ;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement