I need assistance with a problem. I have completed the C++ coding, however the formula I used is not giving me the correct answers. I need to write a C++ program for A classical music radio station that is currently raising funds. Listeners call in to make a donation to support them. Write a program to do the following. Ask the user to enter the amount of money donated by each donor. When there is no more to enter, type -1 to stop. Calculate and display the total amount of money raised.
#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
double donation = 0.0;
double totalAmt = 0.0;
double total = 0.0;
cout << "Enter amount donated by donor [or -1 to stop]: " ;
cin >> donation;
while (donation != -1)
{
totalAmt = donation + donation;
cout << "Total amount: " << totalAmt << endl;
total = totalAmt + totalAmt;
cout << "Enter amount donated by donor [or -1 to stop]: " ;
cin >> donation;
}
cout << "Total amount of money raised: " << total << endl;