• Home
  • About
    • on Weekend photo

      on Weekend

      𝙎𝙩𝙪𝙙𝙮𝙞𝙣𝙜

    • Learn More
    • Instagram
    • Github
  • Archive
    • All Posts
    • All Tags
    • All Categories
  • Categories
    • Problem Solving
    • TIL
    • Study
    • Etc
    • 필사
  • Projects

[백준] 2441 별 찍기 4

06 Dec 2020

‘별 찍기 4’ 문제 확인

코드

#include <iostream>
#include <string>
#include <vector>
#include <deque>
#include <algorithm>

using namespace std;


int main()
{
	int N;
	cin >> N;
	for (int i = N; i > 0; i--) {
		int space = N - i;
		for (int j = 0; j < space; j++) cout << " ";
		for (int k = 0; k < i; k++) cout << "*";
		cout << endl;
	}
	return 0;
}



problem_solvingc++ Share Tweet +1