WAP in Java to print the following
pattern.
a
a a
a a a
a a a a
a a a a a
please answer my question
Answers
Answered by
0
Answer:
I don't know your question
Answered by
9
—› Your Program:
{
{
{
{
}
}
}
}
--------------------------
—› Output:
Enter the no. of rows to print the pattern
5
a
a a
a a a
a a a a
a a a a a
--------------------------
—› Variable Description:
- n = to take the input from the user to enter the no. of rows as I have used scanner class.
- i , j = to run the loop
---------------------------
—› Note:
- println() - It is used to print after each next line.
- print() - It is used to print in the same line.
---------------------------
Similar questions