fork download
  1. //課題2
  2. # include <stdio.h>
  3.  
  4. int fuzzyStrcmp(char s[], char t[]){
  5. int i;
  6.  
  7. for(i=0;s[i]==t[i] || s[i]==t[i]-32 || s[i]==t[i]+32;i++){
  8. if(s[i]=='\0')return 1;
  9. }
  10. return 0;
  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 0.01s 5292KB
stdin
abCD AbCd
stdout
abCD = AbCd -> 1