← Back to List

2443번: 별 찍기 - 6 ↗

Solutions

C++14
195 B | 195 chars
#include <iostream>
using namespace std;
int N;
int main()
{
	cin>>N;
	for(int x=N; x>=1; x--)
	{
		for(int y=1; y<=N-x; y++) cout<<" ";
		for(int y=1; y<=2*x-1; y++)cout<<"*";
		cout<<endl;
	}
}