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