fork download
  1. # include <stdio.h>
  2. int fuzzyStrcmp(char s[], char t[]){
  3. int i;
  4. for(i=0; i<=100; i++){
  5. if(s[i]=='\0')
  6. return 1;
  7. if(s[i] != t[i]){
  8. if(s[i]>=97 && s[i]<=127)
  9. s[i]=s[i]-32;
  10. else if(s[i]>=65 && s[i]<=90)
  11. s[i]=s[i]+32;
  12. if(s[i]==t[i])
  13. continue;
  14. else
  15. break;
  16. }
  17. }
  18. return 0;
  19. }
  20.  
  21. //メイン関数は書き換えなくてできます
  22. int main(){
  23. int ans;
  24. char s[100];
  25. char t[100];
  26. scanf("%s %s",s,t);
  27. printf("%s = %s -> ",s,t);
  28. ans = fuzzyStrcmp(s,t);
  29. printf("%d\n",ans);
  30. return 0;
  31. }
  32.  
Success #stdin #stdout 0.01s 5288KB
stdin
abC abc
stdout
abC = abc -> 1