eclipse软件中遇到的问题
我用的eclipse编译的C++,我在project下运行完一个文件,在运行另一个,总是出现下面的问题:提示红色括号出错!如果重新建立一个文件夹,则可以运行。
求大神指教!!!!!
#include <iostream>
const double litre=0.264179; //1公升=0.264179加仑
double ave(double n_litre,double distance);
int main()
{
using namespace std;
double a1,b1,c1,a2,b2,c2;
char d;
do
{
cout << "input two car's litre of oil:" <<endl;
cin >> a1,a2;
cout << "input two car's distance:" <<endl;
cin >> b1,b2;
c1=ave(a1,b1);
c2=ave(a2,b2);
cout.setf(ios::fixed);
cout.setf(ios::showpoint);
cout.precision(2);
cout <<c1<<endl;
cout <<c2<<endl;
if(c1>c2)
cout << "the first car is good." << endl;
else if(c1==c2)
cout << "the two car has the same level."<<endl;
else if(c1<c2)
cout << "the second car is good." << endl;
cout << "if you want comulate another input 'y';"
" end of program intput 'n'."<<endl;
cin >> d;
}while((d=='y')||(d=='Y'));
cout << "end."<<endl;
return 0;
}
double ave(double n_litre,double distrance)
{
return(distrance/(litre*n_litre));
}