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