>>805
直した。

#include <stdio.h>
#include <stdlib.h>
int main(){
int a,b;
div_t tmp1,tmp2,tmp3;
printf("*** a/b を計算します(小数第3位を四捨五入) ***\na = ");
scanf("%d",&a); printf("b = "); scanf("%d",&b);
tmp1 = div(a,b);
tmp2 = div(tmp1.rem * 100, b);
tmp3 = div(tmp2.rem * 10, b);
if(tmp3.rem >=5) ++tmp2.quot;
if(tmp2.quot >= 100){++tmp1.quot;tmp2.quot%=100;}
printf("a/b = %d.%d",tmp1.quot,tmp2.quot);
return 0;
}