double型要用%lf输入,不能用%d另外输出也是一样,不能用%d输出double型数据,改成%lf
改为scanf("%lf", &a);printf("%lf\n", b);
scanf("%lf", &a);
printf("%lf\n", b);