0
Solve the java problem
Write the java program for the following scenario print the following pattern with the input string. Accept the string from the user. Input string âJAVAâ Triangle pattern: J AAA VVVVV AAAAAAA
2 Answers
+ 9
What is your attempt?
+ 5
Follow these steps
1 - use for loop
2 - inside for loop do
int m = 2 * i + 1; //here i will start from 0
3 - now use another for loop inside first loop and print each character till m times.
4 - to read each character use charAt(i) method.