Code:
void main(void)
{
double a[5], b=0.0;
a[0] = 0;
a[1] = 5;
a[2] = 10;
a[3] = 15;
a[4] = 20;
a[5] = 25;
b = a[5]+a[1];
cout << b << endl;
}
WTF?
AFAIK I am not doing anything wrong with the arrays.
I kept getting that sorry for your inconvenience message for cpp1.cpp. :?
this works though:
Code:
void main(void)
{
double b;
double a[2];
a[0]=1;
a[1]=2;
a[2]=3;
b = a[0]*a[1]+a[2];
cout << b << endl;
}