while(divA != -1) { cout <<\"Enter amounts of dividends, or enter -1 to quit:\"
ID: 3617382 • Letter: W
Question
while(divA != -1)
{
cout <<"Enter amounts of dividends, or enter -1 to quit:" << endl;
cin >>divA;
dividend[0] +=divA;
}
dividend[0] +=1;
div1.setDividend(dividend[0]);
cout <<"Enter corresponding stock names: "<<endl;
cin.ignore(10,' ');
cin >> stockA >>stockB >> stockC;
getline(cin,stName);
div1.setName(stName);
how do I connect the stock nameto the corresponding amount so I can produced outputlike
Dividends
Google 2000
Coke 2000
Ibm 1000
Total 5000