Source Code :
#include <iostream>
using namespace std;
int main () {
int segi1;
cout << "";
cin >> segi1;
for (int j = 1; j <= segi1; ++j) {
for (int i = 1; i <= segi1; ++i) {
if (i <= segi1 - j)
cout << " ";
else
cout << "*";
}
cout << "\n";
}
}
Tidak ada komentar:
Posting Komentar