PE

baio2033 Reply 7 years 32 weeks ago
#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { char c; char tmp = 0; c = getchar(); while (c != EOF) { if (c == '"') { printf("%c", c); c = getchar(); while (c != '"') { printf("%c", c); c = getchar(); if (c == EOF) return 0; } printf("%c", c); c = getchar(); if (c == EOF) return 0; } else if (c == '/') { tmp = c; c = getchar(); if (c == EOF) { printf("%c", tmp); return 0; } if (c == '*') { c = getchar(); while (c != '*') { c = getchar(); if (c == '*') { c = getchar(); while (c == '*') c = getchar(); if (c == '/') { c = getchar(); if (c == EOF) return 0; break; } } } //c = getchar(); //if (c == '/') c = getchar(); } else { printf("%c%c",tmp, c); c = getchar(); if (c == EOF) return 0; } } else { printf("%c", c); c = getchar(); if (c == EOF) return 0; } } return 0; } 제발 알려주세요 어디가 틀린건지
withcs1 Reply 7 years 31 weeks ago
축하드려요!