fork download
  1. #include<stdio.h>
  2. int main(){
  3. int f;
  4. char s[2];
  5. scanf("%s",s);
  6. while((s[0]!=" ")&&(s[1]!=" ")){
  7. f=0;
  8. switch(s[0]){
  9. case b: if(s[1]==d)
  10. f=1;
  11. break;
  12. case d: if(s[1]==b)
  13. f=1;
  14. break;
  15. case p: if(s[1]==q)
  16. f=1;
  17. break;
  18. case q: if(s[1]==p)
  19. f=1;
  20. break;
  21. case H: if(s[1]==H)
  22. f=1;
  23. break;
  24. }
  25. if(f==1)
  26. printf("Mirrored pair\n");
  27. else
  28. printf("Ordinary pair\n");
  29. scanf("%s",s);
  30. }
  31. return 0;
  32. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Fr
qp
HH
db
  
compilation info
prog.c: In function ‘main’:
prog.c:6: warning: comparison between pointer and integer
prog.c:6: warning: comparison with string literal results in unspecified behavior
prog.c:6: warning: comparison between pointer and integer
prog.c:6: warning: comparison with string literal results in unspecified behavior
prog.c:9: error: ‘b’ undeclared (first use in this function)
prog.c:9: error: (Each undeclared identifier is reported only once
prog.c:9: error: for each function it appears in.)
prog.c:9: error: ‘d’ undeclared (first use in this function)
prog.c:15: error: ‘p’ undeclared (first use in this function)
prog.c:15: error: ‘q’ undeclared (first use in this function)
prog.c:21: error: ‘H’ undeclared (first use in this function)
prog.c:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result
prog.c:29: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result
stdout
Standard output is empty