#include <stdio.h>
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system(“pause”) or input loop */
int main(int argc, char *argv[]) {
double d;
d=8.0;
printf(“d is %If”,d);
return 0;
}
为啥输出的结果是d=0呢?
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system(“pause”) or input loop */
int main(int argc, char *argv[]) {
double d;
d=8.0;
printf(“d is %If”,d);
return 0;
}
为啥输出的结果是d=0呢?
解决方案
80
那个应该是小写的L,你写成大写的i了
#include <stdio.h> #include <stdlib.h> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char *argv[]) { double d; d = 8.0; printf("d is %lf", d); return 0; }