/* C ÇÁ·Î±×·¡¹Ö ±â¸»°í»ç */ /* Çйø: ¼º¸í: */ /* 1. ´ÙÀ½ ÇÁ·Î±×·¥ÀÇ Ãâ·ÂÀ» ½á¶ó. */ #include int my_strlen(char *s) { int n = 0; while(*s != '\0') { if (*s > 'm') { n = n + 1; } else { n = n - 1; } s++; } return n; } main() { printf("result = %d\n",my_strlen("kimtaegyun")); }