Computer Science, asked by subhrajeet57, 10 months ago

write a pattern program

2 2 2 2 2
3 3 3 3
2 2 2
3 3
2

who will answer this Question,I will give you brainliest answer ​

Answers

Answered by shan995
0

Answer:

3 WILL BE THE ANSWER. PLZ MARK ME AS BRAINLIEST ANSWER.


subhrajeet57: no it's wrong
sameer7815: you have to write the code
subhrajeet57: java
Answered by sameer7815
2

here is your code

class numpyramid

{

public static void main(String[] ar) {

for(int i=3; i>=1; i--) {

for(int j=1; j<=i; j++) {

System.out.print(i + " ");

}

System.out.println();

for(int k=3; k>=i; k--) {

System.out.print(" ");

}

}

}

}


subhrajeet57: java
sameer7815: ok
subhrajeet57: thankx
sameer7815: that's so grateful of u
Similar questions