[
問題出在哪?是double x;嗎???(如何解決?)
sacanf不能識別expf(1),你輸入它等於輸入0
你需要輸入2.71828
#include <stdio.h>
#include <math.h>
int main()
{
double i;
scanf_s("%lf", &i);
double x = logf(i);
printf("%lf", x);
}
2.71828
0.999999Press any key to continue . . .