Write a Java program to display the following pattern.
Sample Pattern :
   J    a   v     v  a                                                  
   J   a a   v   v  a a                                                 
J  J  aaaaa   V V  aaaaa                                                
 JJ  a     a   V  a     a



package com.company;

import java.util.Scanner;

public class Main {

public static void main(String[] args) {
// write your code here


System.out.println(" J A V V A");
System.out.println(" J A A V V A A");
System.out.println("J J AAAAAA V V AAAAAAA");
System.out.println( " JJ A A V A A");

}
}
     J      A    V      V     A
     J     A  A   V    V    A   A
J    J    AAAAAA   V  V    AAAAAAA
 JJ      A     A    V    A        A

Process finished with exit code 0

Comments

Popular posts from this blog

the distance between two cities (in km is input through the keyboard. write a program to convert and print this distance in meter ,feet inches and centimeter.

CREATE UNIT CONVERTER APP

write a program to check whether a triangle is valid or not, when the threeangles of the triangle are entered through the keyboard. A triangle is valid if the sumof all the three angles is equal to 180 degrees