fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a,b,c,d;// your code goes here
  5. scanf("%d,%d",&a,&b);
  6. if(b==0)
  7. {
  8. return 0;
  9. }
  10. c=a%b;
  11. d=a/b;
  12. switch(c)
  13. {
  14. case 0:
  15. printf("%d÷%d=%d",a,b,d);
  16. break;
  17. default:
  18. printf("%d÷%d=%d余り%d",a,b,d,c);
  19. break;
  20. }
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0s 5284KB
stdin
100,33
stdout
100÷33=3余り1