怎么初始化无理数
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
const double a;
a* a = 5;
cout << "黄金分割比=" << fixed << setprecision(14) << a / 2 - 1 / 2 << endl;
return 0;
}
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
const double a;
a* a = 5;
cout << "黄金分割比=" << fixed << setprecision(14) << a / 2 - 1 / 2 << endl;
return 0;
}
2022-09-03
举报