No Numerals
Hi All , my code pass all test cases unless the #6 test case. Do you have any idea how to solve it? #include <stdio.h> #include <ctype.h> #include <string.h> #include<stdlib.h> int main() { char str1[100]; scanf("%[^\n]s",str1); for (int i =0; i < strlen(str1); i++){ if (isalpha(str1[i])>0) printf ("%c", str1[i]); else if (str1[i] == ' ') printf (" "); else if ((str1[i] == '1') && (str1[i+1] !='0')) printf ("one"); else if (str1 == '2') printf ("two"); else if (str1 [i] == '3') printf ("three"); else if (str1[i]== '4') printf ("four"); else if (str1[i] == '5') printf ("five"); else if (str1[i]== '6') printf ("six"); else if (str1[i] == '7') printf ("seven"); else if (str1[i]== '8') printf ("eight"); else if (str1[i] == '9') printf ("nine"); else if ((str1[i] == '1' && str1[i+1] =='0')){ printf ("ten"); i++; } } return 0; }