Java program that prints the United States flag
Posted by Samath
Last Updated: January 08, 2021

Write a Java program that prints the United States flag, using * and = characters.

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("* * * * * * ====================================");
        System.out.println(" * * * * *  ====================================");
        System.out.println("* * * * * * ====================================");
        System.out.println("================================================");
        System.out.println("================================================");
        System.out.println("================================================");
        System.out.println("================================================");
        System.out.println("================================================");
        System.out.println("================================================");
        System.out.println("================================================");
        System.out.println("================================================");
        System.out.println("================================================");
	}
}
Related Content