fork download
  1. # include <stdio.h>
  2.  
  3. int fuzzyStrcmp(char s[], char t[]){
  4. int i;
  5.  
  6. for (; s[i] != '\0'; i++) {
  7. if ('a' <= s[i] && s[i] <= 'z') {
  8. s[i] = s[i] - 32;
  9. }
  10. }
  11. for (; t[i] != '\0'; i++) {
  12. if ('a' <= t[i] && t[i] <= 'z') {
  13. t[i] = t[i] - 32;
  14. }
  15. }
  16. for (; ; i++) {
  17. if (s[i] != t[i]) {
  18. return 0;
  19. }
  20. if (s[i] == '\0') {
  21. return 1;
  22. }
  23. }
  24. }
  25.  
  26. int main(){
  27. int ans;
  28. char s[100];
  29. char t[100];
  30. scanf("%s %s",s,t);
  31. printf("%s = %s -> ",s,t);
  32. ans = fuzzyStrcmp(s,t);
  33. printf("%d\n",ans);
  34. return 0;
  35. }
  36.  
Success #stdin #stdout 0s 5288KB
stdin
abCD AbCd
stdout
abCD = AbCd -> 1