0% found this document useful (0 votes)
3 views5 pages

Class10 Number Patterns Full

The document provides over 50 examples of number pattern programs suitable for Class 10, showcasing various patterns such as row-wise and column-wise arrangements, continuous numbers, and decreasing sequences. Each pattern is accompanied by a code snippet in Java to illustrate how to generate the respective output. Additionally, it includes shortcuts and tricks for writing pattern programs effectively.

Uploaded by

atharvsharma9450
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views5 pages

Class10 Number Patterns Full

The document provides over 50 examples of number pattern programs suitable for Class 10, showcasing various patterns such as row-wise and column-wise arrangements, continuous numbers, and decreasing sequences. Each pattern is accompanied by a code snippet in Java to illustrate how to generate the respective output. Additionally, it includes shortcuts and tricks for writing pattern programs effectively.

Uploaded by

atharvsharma9450
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Class 10: Number Pattern Programs (50+ Examples)

1. Row-wise Same Number


Pattern:
1
22
333
4444
Code:
for (int i = 1; i <= 4; i++) {
for (int j = 1; j <= i; j++) {
System.out.print(i);
}
System.out.println();
}

2. Column-wise Counting
Pattern:
1
12
123
1234
Code:
for (int i = 1; i <= 4; i++) {
for (int j = 1; j <= i; j++) {
System.out.print(j);
}
System.out.println();
}

3. Continuous Numbers
Pattern:
1
2 3
4 5 6
7 8 9 10
Code:
int num = 1;
for (int i = 1; i <= 4; i++) {
for (int j = 1; j <= i; j++) {
System.out.print(num + " ");
num++;
}
System.out.println();
}

4. Square of same row number


Pattern:
1 1 1
2 2 2
3 3 3
Code:
for (int i = 1; i <= 3; i++) {
for (int j = 1; j <= 3; j++) {
System.out.print(i + " ");
}
System.out.println();
}

5. Square of column numbers


Pattern:
1 2 3
1 2 3
1 2 3
Code:
for (int i = 1; i <= 3; i++) {
for (int j = 1; j <= 3; j++) {
System.out.print(j + " ");
}
System.out.println();
}

6. Reverse Column Numbers


Pattern:
3 2 1
3 2 1
3 2 1
Code:
for (int i = 1; i <= 3; i++) {
for (int j = 3; j >= 1; j--) {
System.out.print(j + " ");
}
System.out.println();
}

7. Triangle Decreasing by Row


Pattern:
1234
123
12
1
Code:
for (int i = 4; i >= 1; i--) {
for (int j = 1; j <= i; j++) {
System.out.print(j);
}
System.out.println();
}

8. Triangle Decreasing Reverse


Pattern:
4321
321
21
1
Code:
for (int i = 4; i >= 1; i--) {
for (int j = i; j >= 1; j--) {
System.out.print(j);
}
System.out.println();
}

9. Skipping Numbers
Pattern:
1
13
135
1357
Code:
for (int i = 1; i <= 4; i++) {
for (int j = 1; j <= 2 * i - 1; j += 2) {
System.out.print(j);
}
System.out.println();
}

10. Repeating Numbers Decreasing


Pattern:
1111
222
33
4
Code:
for (int i = 1; i <= 4; i++) {
for (int j = 1; j <= 5 - i; j++) {
System.out.print(i);
}
System.out.println();
}
Pattern Writing Tricks (Class 10 Shortcuts)

1. Row number chhapna ho -> System.out.print(i);


2. Column number chhapna ho -> System.out.print(j);
3. Agar continuously 1,2,3... chahiye -> int num = 1; print num++;
4. Stars ya numbers badh rahe ho -> for (j = 1; j <= i; j++)
5. Stars ya numbers kam ho rahe ho -> for (j = 1; j <= rows - i + 1; j++)
6. Reverse chahiye to j ko zyada se chhota kar -> for (j = i; j >= 1; j--)
7. Space chahiye to -> System.out.print(" ");
8. Pyramid style numbers -> Use (2*i - 1) formula.

You might also like