틀리는 이유를 못 찾겠습니다..

joey9705 Reply 7 years 7 weeks ago
#include <stdio.h> #include <string.h> main() { char source[] = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"; int c, length, zero, number, output, count; length = strlen(source); int digit[length]; for(zero = 0; zero < length; ++zero) { digit[zero] = 0; } while( (c = getchar()) != EOF) { for(number = 0; number < length; ++number) { if(c == source[number]) ++digit[number]; } } for(output = 0; output < length; ++output) { printf("%c: ", source[output]); for(count = 0; count < digit[output]; ++count) { printf("*"); } printf("\n"); } } 계속 Wrong Answer이라고 뜨는데 어떤 부분이 어떻게 잘못됐는지 잘 모르겠네요..
withcs1 Reply 7 years 7 weeks ago
', ", ?, \ 는 문자로 정의되기 위해서 앞에 \를 필요로합니다.