1. Gihan Lavindu

1
2 2
0 0 0
1 1 1 1
2 2 2 2 2
0 0 0 0 0 0

2. shubham jain

how to make the pattern.
1
232
34543
and
1
23
345
4567

3. How to print this pattern.

9204605198
920460519
92046051
9204605
920460
92046
9204
920
92
9

4. manas sawant

using for loop
1111
000
11
0

print this pattern.

5. soujanya

Alternate solution for Pattern 5

public class Pattern{
public static void main(String[] args) {
int n =5;
for(int i=1;i<=n;i++)
{
for(int j=1;j<=i;j++)
{
if((i%2==0&&j%2==0)|(i%2!=0&&j%2!=0)) //if both i and j are even or both are odd then
print 1
System.out.print(1+" ");
else
System.out.print(0+" ");

}

System.out.println();
}

}
}

6. Siddharth

5 4 3 2 1
4 3 2 1
3 2 1
2 1
1

• anshol

void main()
{
for(int i=1;i=1;j++)
{
System.out.print(j);
}
System.out.println();
}
}

7. Debashis Nanda

Help me to print this pattern
* * * * *
* *
* *
* *
* * * * *

8. Debashis Nanda

Help me to print this pattern in java
* * * * * * *
* * * * *
* * *
*
* * *
* * * * *
* * * * * * *

public class Pat70{

public static void main(String []args){
int x=5;

for(int i=1;i5)x=x+2;
for(int j=i;j<=x;j++)
{System.out.print("*");
}
System.out.println();

}

}
}

9. lakshay

help
* *
** **
*** ***
**** ****
**********

10. ac

can you help me with this program

0
1 0 1
2 1 * 1 2
1 0 1
0

11. Nicole

1
121
12321
1234321
123454321
12345654321
1234567654321
12345654321
123454321
1234321
12321
121
1

• Krishnan Mishra

1
121
12321
1234321
123454321
12345654321
1234567654321
12345654321
123454321
1234321
12321
121
1

class JavaApplication1{

public static void main(String args[]) {
for(int i=1;i<8;i++){
int j=1;
while(j1){
System.out.print(–l);
}
System.out.println();
}
for(int i=6;i>0;i–){
int j=1;
while(j1)
System.out.print(–l);
System.out.println();
}
}
}

12. stuti

0
101
21012
3210123
432101234
send me code for this

• Richard

/*

0
101
21012
3210123
432101234
*/
import java.util.Scanner;
public class Pattern
{
public static void main(String[] args)
{
Scanner scanner =new Scanner(System.in);
System.out.println(“Enter No of rows : “);
int n=scanner.nextInt();
int k=0;
for(int i=0;i<n;i++)
{
k=i;
for(int j=0;j0)
{
System.out.print(k);
{
k–;
}
else
{
k++;
}
}
else if(k==0)
{
System.out.print(k);
k++;
}
}
System.out.println();
}
}
}

13. SAURABH KUMAR YADAV

Help me print this pattern
12345
21234
32123
43212
54321

• Krishnan Mishra

/*
1 2 3 4 5
2 1 2 3 4
3 2 1 2 3
4 3 2 1 2
*/

class JavaApplication1{

public static void main(String args[]) {
for(int i=1;i<5;i++){
for(int j=1,k=i,l=1,m=5-i;j0){
System.out.print(k–+” “);
}
while(m>0){
System.out.print(++l +” “);
m–;
}
}
System.out.println();
}
}
}

14. saptaparna basu

help me
0
1 2
3 4 5
9 8 7 6
5 4 3
2 1
0

15. help to this one/

1
212
32123
4321234
543212345
65432123456
7654321234567
65432123456
543212345
4321234
32123
212
1

16. aravinth

1
2 2
3 3 3
4 4 4 4
5 5 5 5 5

• KIRUBHA

int rowCount=5;
for(int i=1;i<=rowCount;i++){
for(int j=1;j<=i;j++){
System.out.print(i);
}
System.out.println();
}

17. Honey Villamor

This one?
1
2 1 2
3 2 1 2 3
4 3 2 1 2 3 4
5 4 3 2 1 2 3 4 5
4 3 2 1 2 3 4
3 2 1 2 3
2 1 2
1

Thanks.

• ye program bna k nhi bhai

• Krishnan Mishra

/*
1
2 1 2
3 2 1 2 3
4 3 2 1 2 3 4
5 4 3 2 1 2 3 4 5
4 3 2 1 2 3 4
3 2 1 2 3
2 1 2
1
*/

class JavaApplication1{

public static void main(String args[]) {
for(int i=1;i<6;i++){
for(int j=1,k=i,l=1;j0){
System.out.print(k–+” “);
}
while(l0;i–){
for(int j=1,k=i,l=1;j0){
System.out.print(k–+” “);
}
while(l<i){
System.out.print(++l +" ");
}
}
System.out.println();
}
}
}

18. sangeetha

help me for this pattern
1
3 2
6 5 4
10 9 8 7
15 14 13 12 11

• Krishnan Mishra

1
3 2
6 5 4
10 9 8 7
15 14 13 12 11

class JavaApplication1{

public static void main(String args[]) {
for(int i=1;i0){
System.out.print(s– + ” “);
j–;
}
System.out.println();
}
}
}

19. ganesh

how to print this patterns
1
11
121
1331

and
#
#*
#*#
#*#*
#*#*#

• #
#*
#*#
#*#*
#*#*#
// the code is here

class Main
{
public static void main(String args[])
{
int n=5;
for(int i=0;i<n;i++)
{
for(int j=0;j<=i;j++)
{
if(j%2==0)
System.out.print("#");
else
System.out.print("*");
}
System.out.println();
}
}
}

20. S .Pranav Balaji

Help me print this pattern

1 2 3 4 5 4 3 2 1
1 2 3 4 * 4 3 2 1
1 2 3 * * * 3 2 1
1 2 * * * * * 2 1
1 * * * * * * * 1