Question
PLEASE ANSWER ASAP DUE TODAY! USE C++ PROGRAM!! THANK YOU!! Question 1: Create a new project. Copy and paste the following program. Compile and fix
PLEASE ANSWER ASAP DUE TODAY! USE C++ PROGRAM!! THANK YOU!!
Question 1: Create a new project. Copy and paste the following program. Compile and fix any syntax errors found during the compilation process. Fix any logic errors that are found during testing and re-run the test. Test your program using the following 11 sets of test data (each input value is separated by a comma, but youll hit the enter key). Before testing, you should guess/calculate by hand what the answers will be. Then, when running the test cases, you can verify your earlier calculations and correct your program if necessary. The first eight tests should all work, the last three are testing for ID10T users and you dont need to correct your program for errors found, just record what your program does. Submit output snippets of all 11 test cases, numbered by the test case it is for (1.1, 1.2, 1.3, etc.). 1. 0, 0, 0, 0, 0 2. 1, 0, 0, 0, 0 3. 0, 1, 0, 0, 0 4. 0, 0, 1, 0, 0 5. 0, 0, 0, 1, 0 6. 0, 0, 0, 0, 1 7. 1, 1, 1, 1, 1 8. 0, 0.5, 2, 3, 4 9. 3, hello, 1, 1, 1, 1 10. 5, my6, 0, 0, 0, 0 11. 10, -4, 0, 0, 0, 0 // coins.cpp // Takes a number of different coins as input, computes and prints total dollar value #include
// update running total to include nickles total += nickles * NICKEL_VALUE ; cout << "Current total is " << total << endl; /****** ** DIMES *******/ cout << "How many dimes do you have? "; cin >> dimes; // update running total to include dimes total = dimes * DIME_VALUE ; cout << "Current total is " << total << endl; /****** ** QUARTERS *******/ cout << "How many quarters do you have? "; cin >> quarters // update running total to include dimes total = total + quarters; cout << "Current total is " << total << endl; /****** ** DOLLARS /****** cout << "How many dollar coins do you have? "; cin >> dollars; // update running total to include dollars total += dollars ; cout << "Current total is " << total << endl; // Display total value of all coins cout << "Total value = " << total << " "; system("pause"); return 0;
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started