fork download
  1. # include <stdio.h>
  2.  
  3. int fuzzyStrcmp(char s[], char t[]){
  4. int i;
  5. int x,y;
  6. for(i = 0; s[i] != '\0' && t[i] != '\0'; i++)
  7. {
  8. x=s[i];
  9. y=t[i];
  10. if(x>= 'a' && x <= 'z'){
  11. x= x - 32;
  12. }
  13. if(y>= 'a' && y<= 'z'){
  14. y= y - 32;
  15. }
  16. if(x!=y){
  17. return 0;
  18. }
  19. }
  20. if(s[i] == '\0' && t[i] == '\0'){
  21. return 1;
  22. }
  23.  
  24. else{
  25. return 0;
  26. }
  27. }
  28.  
  29.  
  30. //メイン関数は書き換えなくてできます
  31. int main(){
  32. int ans;
  33. char s[100];
  34. char t[100];
  35. scanf("%s %s",s,t);
  36. printf("%s = %s -> ",s,t);
  37. ans = fuzzyStrcmp(s,t);
  38. printf("%d\n",ans);
  39. return 0;
  40. }
  41.  
Success #stdin #stdout 0s 5308KB
stdin
abCD AbCd
stdout
abCD = AbCd -> 1