一个关于float和double运用的小问题
#include<stdio.h>#define R 1
main()
{
float c,r,s; //为什么不能用double
printf("input a number: ");
scanf("%f",&c);
#if R
r=3.14159*c*c;
printf("area of round if:%f\n",r);
#else
s=c*c;
printf("area of square is:%f\n",s);
#endif
}