Codeup.kr/C언어 기초 100제
[Code up 문제] 1024번 단어 1개 입력받아 나누어 출력하기
Jongung
2021. 9. 4. 14:11
1. 정답 코드
#include <stdio.h>
int main()
{
char d[30];
scanf("%s", d);
for(int i=0; d[i]!='\0'; i++)
{
printf("\'%c\'\n", d[i]);
}
}
2. 코드 설명
반복문을 사용해서 d배열로 받아온 글자들을 하나 씩 나눠 출력해준다.