Untitled
unknown
plain_text
a year ago
371 B
9
Indexable
#include <iostream>
using namespace std;
int main() {
int a=5;
for (int i = 1; i <= a; i++) {
for (int j = 0; j < a - i; j++) {
cout << " ";
}
for (int j = 0; j < 2 * i - 1; j++) {
cout << "*";
}
cout << endl;
}
return 0;
}
Editor is loading...
Leave a Comment