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
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
Post a Comment