report - I also changed the pctAgainst to equal 100...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Alan Hwang 103-777-115 Step 5 In step 5, I gave it the integer 5 when it asked how many were surveyed. I gave the integer 4 when they asked how many supported, and I gave the integer 5 when they asked how many oppose the proposal. The values it returned were 80% supporting, and 100% opposing the Governor's proposal. Logic Error The error I introduced to the logic_error is that I changed the pctFor to equal 100* numberFor/ numberAgainst rather than numberFor/ number Surveyed.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: I also changed the pctAgainst to equal 100* numberAgainst/ numberFor. This creates a ratio instead of a percentage. Compile Error In the compile error, I "forgot" the close parentheses after int main ( I also "forgot" to type the line using namespace std; The compiler gave the error message "Expected primary-expression before '{' "token for the line under int main( It also gave the error message "expected '.' or ',' at end of input at the last line....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online