ignoring return value of“scanf”是要接收返回值
int ret=scanf("%f%f",&a,&b);
试试吧
一般是printf("%.2f",要求小数点后保留两位将scanf改为scanf_s