expand icon
book C++ Programs to Accompany Programming Logic and Design 8th Edition by Jo Ann Smith cover

C++ Programs to Accompany Programming Logic and Design 8th Edition by Jo Ann Smith

Edition 8ISBN: 978-1285867410
book C++ Programs to Accompany Programming Logic and Design 8th Edition by Jo Ann Smith cover

C++ Programs to Accompany Programming Logic and Design 8th Edition by Jo Ann Smith

Edition 8ISBN: 978-1285867410
Exercise 6
Accumulating Totals in Single-Level Control Break Programs
In this exercise, you will use what you have learned about accumulating totals in a single-level control break program. Study the following code, and then answer Questions.
if(sectionNum != oldSectionNum){System.out.println("Section Number " + oldSectionNum);totalSections = 1;oldSectionNum = sectionNum;}
Is totalSections being calculated correctly?
If not, how can you fix the code?
Explanation
Verified
like image
like image

blured image
, the calculation of "totalSections" ...

close menu
C++ Programs to Accompany Programming Logic and Design 8th Edition by Jo Ann Smith
cross icon