Write code for following pattern java
6
5 5
4 4 4
3 3 3 3
2 2 2 2 2
1 1 1 1 1 1
Answers
Answered by
1
Hello mate --
Solution
import java.util.Scanner;
class PAT
{
public static void main (String args[])
{
int n=6;
for(int I=1; i<=6; i++)
{
for (int j=1;j<=i; j++)
{
System.out.print( --n="+");
n--;
}
System.out.println( );
}
}
}
anirudhsingh87:
Thanks bro marking my answer as. a brainliest
Similar questions
Computer Science,
7 months ago
Biology,
7 months ago
CBSE BOARD XII,
7 months ago
Geography,
1 year ago
Math,
1 year ago