Write a program FacePrinter that prints a face which hopeful
Write a program FacePrinter that prints a face which hopefully looks better than this one:
/ / / / / /
| o o |
( | ^ | )
| [ __ ] |
\\_______/
Write a program FacePrinter that prints a face which hopefully looks better than this one:
/ / / / / /
| o o |
( | ^ | )
| [ __ ] |
\\_______/
Write a program FacePrinter that prints a face which hopefully looks better than this one:
/ / / / / /
| o o |
( | ^ | )
| [ __ ] |
\\_______/
Solution
/**
* The java program FacePrinter that
* prints a face to console
* */
//FacePrinter.java
public class FacePrinter
{
public static void main(String[] args)
{
//print face head
System.out.println(\" //////\");
System.out.println(\" | 0 0 |\");
System.out.println(\"(| ^ |)\");
System.out.println(\" | [___] |\");
System.out.println(\" \\\\_______/\");
//Note :To print single \\
//user \\\\ as one \\ as escape character
}
}
Sample Output:
![Write a program FacePrinter that prints a face which hopefully looks better than this one: / / / / / / | o o | ( | ^ | ) | [ __ ] | \\_______/ Write a program Write a program FacePrinter that prints a face which hopefully looks better than this one: / / / / / / | o o | ( | ^ | ) | [ __ ] | \\_______/ Write a program](/WebImages/42/write-a-program-faceprinter-that-prints-a-face-which-hopeful-1128721-1761602484-0.webp)