为什么只有10分啊?
查看原帖
为什么只有10分啊?
1466341
woritage楼主2024/11/4 21:59
#include <stdio.h>
#include<math.h>
int main()
{
    int n;
    scanf("%d",&n);
    long double x,y,f,a,b;
    a=1+sqrt(5);
    b=1-sqrt(5);
    x=pow(a/2,n);
    y=pow(b/2,n);
    f=(x-y)/sqrt(5);
    printf("%.2lf",f);
    return 0;

}
``` ```
2024/11/4 21:59
加载中...