This is what I need to do: get 5 amounts, display & add a $10 fee if the amount is more than $500. This is what I have to far, but I keep getting error: "cannot convert 'double*' to 'double' in assignment"
int main()
{
double acctBal[5];
for (int i = 0; i < 5; i = i + 1)
{
acctBal[i] = 0.0;
}
cout << "You will be asked to enter the balance of 5 saving accounts."<< endl;
cout << "Enter balance of an account: "<< endl;
for (int i = 0; i < 5; i = i + 1)
{
cout << "Enter balance of an account: ";
cin >> acctBal[i];
}
cout << endl;
cout << "Balances entered are: "<< endl;
for (int i = 0; i < 5; i = i + 1)
{
cout << acctBal[i] << endl;
}
for (int i = 0; i < 500; i = i + 1)
{
acctBal[i] = acctBal + 10;
}
cout << endl;
cout << "Apply $10 fee for accounts with balance below $500. "<< endl;
cout << "New Balances: " << endl;
for (int i = 0; i < 10; i = i + 1)
{
cout << acctBal[i] << endl;
}
system("pause");
return 0;
}
Please copy and paste the exact error message, including the line number.
Speaking of line numbers, edit your post and put code tags around your code to get syntax highlighting. Remember, those things you backspaced when you started a new topic?