This preview shows page 1. Sign up to view the full content.
Unformatted text preview: double pctAgainst = 100.0 * numberAgainst / numberSurveyed; 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
This note was uploaded on 11/10/2011 for the course CS 31 taught by Professor Melkanoff during the Spring '00 term at UCLA.
- Spring '00