//the coding needs to read amount received and donor name until an amount of R0.00 is entered.
//And display the name and donation amount of the donors who donated a R1000.00 or more.
//At the moment it does not compile and does nothing.
#include <iostream>
#include <string>
usingnamespace std;
int main()
{
string donorName;
float donationAmt = 0.00;
float medicalAmt = 0.00;
float dinigroomAmt = 0.00;
cout<<"Enter Donation Please: ";
cin>>donationAmt;
while (donationAmt > 0.00)
{
cin.get();
getline(cin, donorName, "\n");
if (donationAmt < 1000.00)
diningroomAmt += donationAmt; //a = a + b
else
{
medicalAmt += donationAmt;
cout<<"Donor: "<<donorName<<" Donation amount: "<<donationAmt<<endl;
}
cin>>donationAmt;
}
cout<<"Amount to be used for the medical centre: R"<<medicalAmt<<endl;
cout<<"The amount to be used for dining room furniture: R"<<diningroomAmt<<endl;
return 0;
}