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

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("+-+-+-+");
        
	}
}
Related Content