fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <ctype.h>
  4. int isLegal( char theString[]){
  5. int i;
  6. for (i=0 ; i < strlen(theString); i++) {
  7. char ch = theString[i];
  8. if (isupper(ch))
  9. ch = tolower(ch);
  10. if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' || ch == 'y')
  11. return 1;
  12. }
  13. return 0;
  14. }
  15.  
  16. int main(void) {
  17. printf("%d", isLegal("PPle"));
  18. // your code goes here
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
1