注释处用指针又改怎么改才能运行啊? 我2个运行都报错
#include
#include
using namespace std;
int main()
{
double Da[100] ;
double Cl[100];
//double *Da = new double[1000];
//double *Cl = new double[1000];
Da[0] = Da[1] = 100.0;
Cl[0] = Cl[1] = 100.0;
int i=2;
do //(i = 2; Da[i] > Cl[i]; i++)
{
Da[i] = Da[1]+(i-1)*10.0;
Cl[i] = Cl[i - 1] * 1.05;
} while (Da[i++] > Cl[i++]);
cout << "How many years the property of Cl is more?: ";
cout << i << endl;
cout << "The property of Da: " << Da[i] << endl;
cout << "The property of Cl: " << Cl[i] << endl;
//delete[]Da;
//delete[]Cl;
getchar();
}