컴공댕이 공부일지

#1. 출력 본문

문제 풀이/백준 새싹문제 풀이 모음

#1. 출력

은솜솜솜 2022. 8. 31. 20:03
728x90

https://solved.ac/problems/sprout

 

 

 

1) Hello World 출력하기

2557번

#include <stdio.h>

int main() {
	
	printf("Hello World!");


	return 0;
}

 

 

2) 오늘 날짜 출력하기

10699번

#include <stdio.h>

int main() {
	
	printf("2022-08-31");

	return 0;
}

 

 

3) 내 아이디와 맞힌 문제 수 출력하기

7287번

#include <stdio.h> 

int main() {

	printf("7\nsomi5488");

	return 0;
}

 

 

4) 고양이 그림 출력하기

10171번

#include <stdio.h> 

int main() {

	printf("\\    /\\ \n )  ( \')\n(  /  ) \n \\(__)|");

	return 0;
}

 

 

5) 강아지 그림 출력하기

10172번

#include <stdio.h> 

int main() {
	
	printf("|\\_/| \n|q p|   /} \n( 0 )\"\"\"\\ \n|\"^\"`    | \n||_/=\\\\__|\n");
	
	
	return 0;
}

 

 

6) 새싹 그림 출력하기

25083번

#include <stdio.h> 

int main() {
	
	printf("         ,r\'\"7 \n");
	printf("r`-_   ,\'  ,/ \n");
	printf(" \\. \". L_r\' \n");
	printf("   `~\\/ \n");
	printf("      | \n");
	printf("      | \n");
	
	return 0;
}

 

 

 

정리

백슬래시나 따옴표 등의 문자 자체를 출력하려면 >>백슬래시<<를 붙여야한다.
728x90

'문제 풀이 > 백준 새싹문제 풀이 모음' 카테고리의 다른 글

#3. 조건  (0) 2022.09.09
#2. 입력과 계산  (0) 2022.08.31
Comments