*1.3 (Display a pattern) Write a program that displays the following pattern:
        J           A          V        V          A
        J        A   A         V     V         A  A
 J     J      AAAAA        V V         AAAAA
   J J      A            A        V        A           A
My Soultion:
*** This solution formats strangely here but if you paste it into eclipse it should work...***
 public static void main(String[] args) {
  
  // output desired string pattern
  System.out.println("    J       A     V     V     A   ");
  System.out.println("    J     A A     V   V     A A ");
  System.out.println("J   J    AAAAA     V V     AAAAA ");
  System.out.println(" J J   A     A     V     A     A");
 } //end of main
} //end of class
 
No comments:
Post a Comment