Q:

Write a Java program to print a face

0

Write a Java program to print a face

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

public class Exercise16 {
    public static void main(String[] args)
    {
        System.out.println(" +"""""+ ");
        System.out.println("[| o o |]");
        System.out.println(" |  ^  | ");
        System.out.println(" | '-' | ");
        System.out.println(" +-----+ ");
    }
	}
	
public class Main {

 public static void main(String[] args) {

  String[] arra = new String[5];

  arra[0] = " +"""""+ ";
  arra[1] = "[| o o |]";
  arra[2] = " |  ^  |";
  arra[3] = " | '-' |";
  arra[4] = " +-----+";

  for (int i = 0; i < 5; i++) {
   System.out.println(arra[i]);
  }

 }

}

Sample Output:

 +"""""+                                                                                                      
[| o o |]                                                                                                     
 |  ^  |                                                                                                      
 | '-' |                                                                                                      
 +-----+ 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now