Question: Instructions: This project gives you experience in debugging loop - based C + + programs. Specifically, you will debug and show the execution of three
Instructions: This project gives you experience in debugging loopbased programs. Specifically, you will
debug and show the execution of three programs that employ a while loop, a for loop, and a do loop, respectively.
For each program, you will submit your source code formatted in a monospaced font and the execution window.
Your grade will depend partly on whether you are able to get the program running. You'll also be graded on the
various style issues discussed in class, eg proper indentation, placing the open brace on the same line as the block
being enclosed by braces, putting a reasonable header comment at the top of each program, using the keyword void
in the parenthesis of function definitions that do not have any arguments, properly commenting sections of code,
declaring meaningful variable names in the declarative region, etc.
Please do not staple your submission pages together. Also, please use only one side of each page. Lastly, you do not
have to submit this instruction and description sheet.
The first "buggy" program shown below inputs two numbers and outputs their sum. It asks if you want to run
the program. If the answer is Y or y it prompts for the two numbers. Right now it does not work. Fix the
program and run it Also correct any style issues, eg void argument in main, curly brace on same line as main,
etc. After fixing the code, you are to respond to the prompt at least three times one with Y one with y and
one with to show proper execution of the program.
#
clude
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
