#include <iostream>
using namespace std;

int main()
{
    int n;
    cin >> n;
    
    int cnt = 2;
    int tmp = 0;
    
    for(int i = 0; i < n; i++)
    {
        for(int j = n-1; j > tmp; j--)
        {
            cout << " ";
        }
        tmp++;
     
        for(int k = 1; k < cnt; k++)
        {   
            cout << "*";
        }
        cnt++;
        cout << "\n";
    }
    return 0;
}

카테고리:

업데이트:

댓글남기기