fork download
  1. #include <stdio.h>
  2. int main(void)
  3. {int a,b;scanf("%d %d",&a,&b);if(b != 0)
  4. {switch(a%b)
  5. {case0:printf("%d÷%d=%d\n",a,b,a/b);break;
  6. default:printf("%d÷%d=%d余り%d\n",a,b,a/b,a%b); break;
  7. }
  8. }return 0;}
Success #stdin #stdout 0.01s 5236KB
stdin
4
0
stdout
Standard output is empty