Skip to content

Commit 9dd5e9b

Browse files
authored
Merge pull request ErSKS#28 from ErSKS/ErSKS-patch-4
Pattern14 integrated with master branch !
2 parents 48d52ed + 88bb898 commit 9dd5e9b

2 files changed

Lines changed: 45 additions & 0 deletions

File tree

Pattern13.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package javapatternsmorning;
2+
3+
/**
4+
*
5+
* @author ErSKS
6+
*/
7+
public class Pattern13 {
8+
9+
public static void p() {
10+
System.out.println("\nPattern13");
11+
int a = 1;
12+
int n = 10;
13+
for (int i = 1; i <= n; i++) {
14+
for (int j = 0; j < i; j++) {
15+
if ((i + j) % 2 == 0) {
16+
System.out.printf("0");
17+
} else {
18+
System.out.printf("1");
19+
}
20+
}
21+
System.out.println("");
22+
}
23+
}
24+
}

Pattern14.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package javapatternsmorning;
2+
3+
/**
4+
*
5+
* @author ErSKS
6+
*/
7+
public class Pattern14 {
8+
9+
public static void p() {
10+
System.out.println("\nPattern14");
11+
int a = 1;
12+
int n = 9;
13+
for (int i = 1; i <= n; i++) {
14+
for (int j = 0; j < i; j++) {
15+
System.out.print(a - 1);
16+
}
17+
a++;
18+
System.out.println("");
19+
}
20+
}
21+
}

0 commit comments

Comments
 (0)