哪位大虾帮忙改一下程序吧,为什么运行不了呢?
#include<iostream.h>
void main()
{
double a[3][3];
int i,j;
double d;double e;int f;
for(i=1;i<3;i++)
{
cout<<"please input line:"<<i++<<endl;
cin>>a[i][j];
for(i=1;i<3;i++)
for(j=0;j<3;j++)
d=a[i][j+1]-a[i][j];
}
if(d<1000)
e=0;
else
if(d<1999)
e=(d-1000)*0.05;
else
if(d<2999)
e=(d-1000)*0.10;
else
if(d<3999)
e=(d-1000)*0.15;
else
if(d<4999)
e=(d-1000)*0.2;
else
e=(d-1000)*0.3;
f=int (d-e);
int c;
c=f/100+f%100/50+f%50/20+f%20/10+f%10/5+f%5/2+f%2/1;
cout<<c<<endl;
}