Need help with my IT all i need is someone to correct the error

User Generated

Senlnyb43

Programming

Description

INF 231 Week 5 Assignment Final Project.cpp I need help i did the work all i need to someone to correct the error this what my teacher said


The reason for the compiler errors that you get is that you have a huge bunch of variables, one group per each section in your program, but don't use them in the appropriate place. I'm referring to the variables "quarterX", "dimeX", "nickelX", and "pennyX" (where "X" is 1, 2, 3, and 4.)  If you double-check carefully which variables you use in which section, you will notice the discrepancies, which cause the compiler errors.

A. In section "second possible way" and also in section "Third possible way", you use in the long "cout" statement variable "penny1" instead of, respectively, "penny2" and "penny3".

B. In section "Fourth possible way" you use in the long "cout" statement several variables that haven't been assigned any value: "quarter4", "dime4", and "nickel4".

C. In section "Third possible way" you use variable "dime1" in the computations (but should use "dime3"); and you use "quarter2" (but should use "quarter3").

If you fix all of that, the program will compile.  More tests and changes are needed, though, before a fully functioning program is finished. (By the way, you use a very complicated logic -- I don't see the need for the four "sections" at all, as I think that a single such "section" should suffice.)

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer


Anonymous
Great! Studypool always delivers quality work.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags