超過(guò)6位小數(shù)怎么寫,這樣對(duì)么
#include <stdio.h>
int main(){
????float b =1.825622335;
? ? double?c =1.825622335;
????printf("%f",b);
????printf("%f",c);
????return 0;
}
#include <stdio.h>
int main(){
????float b =1.825622335;
? ? double?c =1.825622335;
????printf("%f",b);
????printf("%f",c);
????return 0;
}
2018-08-03
舉報(bào)
2018-08-03
你可以指定輸出的小數(shù)多少位,例如,你可以把兩個(gè)數(shù)都用printf("%.12f",c);這樣的輸出了,float的會(huì)和原來(lái)的數(shù)不一樣,但是double就不會(huì)
2018-08-03
為啥得到只能是6位