Pattern 3
user_6679955
c_cpp
10 months ago
146 B
16
Indexable
void nTriangle(int n) {
for(int i=0; i<n; i++){
for (int j=0; j<=i; j++){
cout<< j+1<<" ";
}
cout<< endl;
}
}Editor is loading...
Leave a Comment
void nTriangle(int n) {
for(int i=0; i<n; i++){
for (int j=0; j<=i; j++){
cout<< j+1<<" ";
}
cout<< endl;
}
}