fork download
  1. #include <stdio.h>
  2. int main(void) {int a,b;scanf("%d %d",&a,&b);if(b != 0){switch(a%b){case 0:printf("%d÷%d=%d\n",a,b,a/b);break;default:printf("%d÷%d=%d余り%d\n",a,b,a/b,a%b); break;}}return 0;}
Success #stdin #stdout 0.01s 5276KB
stdin
9
3
stdout
9÷3=3