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