#include <stdio.h>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;}
9 3
9÷3=3
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!