Translate

Tuesday 24 December 2013

Write a java code to print goat

class goat
{
public static void main(String abc[])
{
System.out.println();
System.out.println();
System.out.println("               <___>");
System.out.println("               (o-o) ");
System.out.println("   +============\\_/  ");
System.out.println("  / || %%%%%  ||      ");
System.out.println(" /  || %%%%%  ||      ");
System.out.println("*   ||--------||      ");
System.out.println("    \"\"        \"\"      ");
}
}

Note: Just copy paste the above code in notepad file and run it. I hope you will enjoy this. Also, from this code you will learn about the importance of escape characters in a program.

No comments:

Post a Comment