Java program that prints a house
Posted by Samath
Last Updated: January 08, 2021
  351

Write a Java program that prints a house.

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