<C언어> 문자열 출력하기
문제 :
문자열 str이 주어질 때, str을 출력하는 코드를 작성해 보세요.
입력 #1
HelloWorld!
출력 #1
HelloWorld!
#include <stdio.h>
int main(void)
{
char str[16];
scanf("%s",str);
printf("%s",str);
return 0;
}
scanf를 잘 사용하지 않아 매번 검색을 하게 되어 간단한 문제이지만 올려본다.
'공부 > 코딩테스트' 카테고리의 다른 글
[프로그래머스,C언어] 원소들의 곱과 합 (2) | 2024.03.16 |
---|---|
[프로그래머스,C언어] 공배수 (0) | 2024.03.16 |