Skip to content

Commit f31d2b4

Browse files
Add files via upload
1 parent 96c1a62 commit f31d2b4

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

NumberTrianglePattern.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include<iostream>
2+
using namespace std;
3+
4+
int main(){
5+
int n;
6+
cin>>n;
7+
8+
for(int i=0; i<n; i++){
9+
for(int j=n-i; j<=n; j++){
10+
cout << j;
11+
}
12+
13+
for(int k=i+1; k<n; k++){
14+
cout << 5;
15+
}
16+
17+
cout << endl;
18+
}
19+
}

0 commit comments

Comments
 (0)