为什么在第13行用%lf也不是%f
#include <stdio.h>
int main()
{
char c='a';
int n=97; //将c赋值给n
float f; //将c赋值给f
double d; //将c赋值给d
n=c;
f=n;
d=f;
printf("%d\n",n);
printf("%f\n",f);
printf("%lf\n",d);
return 0;
}
#include <stdio.h>
int main()
{
char c='a';
int n=97; //将c赋值给n
float f; //将c赋值给f
double d; //将c赋值给d
n=c;
f=n;
d=f;
printf("%d\n",n);
printf("%f\n",f);
printf("%lf\n",d);
return 0;
}
2016-06-10
举报