티스토리 뷰
C++로 구현한 크리스마스 트리
#include <iostream>
using namespace std;
#define width 15
#define height 15
int main()
{
cout << "\n*** Merry Chritsmas ***\n\n";
for (int a = 0; a < width - 1; a++)
{
cout << " ";
}
cout << "@\n";
for (int i = 1; i <= height; i++)
{
for (int j = 0; j < width - i; j++)
{
cout << " ";
}
for (int a = 0; a < i; a++)
{
cout << "*";
}
for (int b = 0; b < i - 1; b++)
{
cout << "*";
}
cout << "\n";
} // 이파리
for (int a = 0; a < width - 2; a++)
cout << " ";
cout << "|||\n"; // 기둥
}
.
.
.
'프로그래밍 > C,C++' 카테고리의 다른 글
정수형을 문자열로 C++ (0) | 2022.07.10 |
---|---|
vector C++ STL(Standard Template Library) (0) | 2022.07.09 |
int main(int argc, char* argv[]) (0) | 2019.09.14 |
문자열 인코딩 개념정리 (0) | 2019.09.14 |
C++ 라이브러리 추가 전처리기 (0) | 2019.07.29 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 토이사이퍼
- 트리만들기
- 정수
- 1152
- getline()
- ??!
- 정수를 문자열로
- 문자열입력
- 웹 서버
- Web Server
- 25083
- 커널
- 쉘
- C++
- 자료구조
- stringstream
- to_string
- 운영체제
- 단어의 개수
- 네트워크결합스토리지
- toy cipher
- cin.getline()
- web application server
- 백준
- 백준알고리즘
- boj
- 알고리즘
- 웹 어플리케이션 서버
- 파일입출력
- 데이터저장장치
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
글 보관함