write a program in java to display the given pattern 135579791113911131517
Answers
Answer:
YOUR ANSWER IS
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
Pictorial Presentation:
Java: Display a specified pattern
Sample Solution:
Java Code:
public class Exercise8 {
public static void main(String[] args) {
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(" JJ a a V a a");
}
}
Copy
Sample Output:
J a v v a
J a a v v a a
J J aaaaa V V aaaaa
JJ a a V a a
Flowchart:
Flowchart: Java exercises: Display a specified pattern