编译错误然而vs和dev都过了 贴出源代码 求指

ClaraChen Reply 1 year 1 week ago
#include<iostream> using namespace std; long double Sibonacci(long double x); int main() { long double answer; int T; cin >> T; long double* p;//for different x(s) p = new long double[T]; while (getchar() != '\n')continue; for (int i = 0; i < T; i++) cin >> p[i]; for (int i = 0; i < T; i++) { if (answer > 1000000007) answer = answer / 1000000007; answer=Sibonacci(p[i]); cout << answer << endl; } delete p; /*cout << "Press 'enter' five times to quit." << endl; for (int i = 0; i < 6; i++) getchar();*/ return 0; } long double Sibonacci(long double x) { if (x < 0)return 0; else if (x >= 0 && x < 1)return 1; else return Sibonacci(x - 1) + Sibonacci(x - 3.14); }