- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest1.java
More file actions
Latest commit
19 lines (18 loc) · 446 Bytes
/
Copy pathTest1.java
File metadata and controls
19 lines (18 loc) · 446 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
Write a program in Java to make such a pattern like a right angle triangle with a number which repeats a number in a row.
The pattern is as follows :
1
22
333
4444
*/
publicclassTest1 {
publicstaticvoidmain(String[] args) {
for (inti = 1; i <= 4; i++) {
for (intj = 0; j < i; j++) {
System.out.print(i + " ");
}
System.out.println();
}
}
}