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