This preview shows page 1. Sign up to view the full content.
Unformatted text preview: double pctFor = 100.0 * numberFor / numberAgainst; double pctAgainst = 100.0 * numberAgainst / numberFor; cout.setf(ios::fixed); // see pp. 31-32 in Savitch book cout.precision(1); cout << endl; cout << pctFor << "% support the proposal." << endl; cout << pctAgainst << "% oppose the proposal." << endl; if (numberFor > numberAgainst) cout << "More people support the proposal than oppose it." << endl; else cout << "More people oppose the proposal than support it." << endl; }...
View Full Document
- Spring '00