编译错误,help
查看原帖
编译错误,help
1349478
tangyiqi楼主2024/8/13 09:26

为什么编译器上总是报错 ??

#include <bits/stdc++.h>
using namespace std;
long long n;
double ans;
int main() {
	scanf("%ld",&n);
	ans = 1.0*(pow((1+sqrt(5))/2,n)-pow(((1-sqrt(5))/2,n)))/sqrt(5)*1.0;
	printf("%.2lf",ans);
	return 0;
}
2024/8/13 09:26
加载中...