fork download
  1. #include <stdio.h>
  2. int main(void) {int a,b,c;scanf("%d %d",&a,&b);c=a%b;if(b != 0){switch(c){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 0s 5292KB
stdin
9
3
stdout
9÷3=3