fork download
  1. # include <stdio.h>
  2. #include <ctype.h>
  3. int fuzzyStrcmp(const char* s, const char* t)
  4. {while(*s&&*t) {
  5. if(toupper(*s)!=toupper(*t)){
  6. return 0; }
  7. s++;
  8. t++;
  9. } return *s == '\0' && *t == '\0';
  10.  
  11. }
  12.  
  13. //メイン関数は書き換えなくてできます
  14. int main(){
  15. int ans;
  16. char s[100];
  17. char t[100];
  18. scanf("%s %s",s,t);
  19. printf("%s = %s -> ",s,t);
  20. ans = fuzzyStrcmp(s,t);
  21. printf("%d\n",ans);
  22. return 0;
  23. }
  24.  
Success #stdin #stdout 0s 5284KB
stdin
abCD AbCd
stdout
abCD = AbCd -> 1