Question: Please solve using C++ 6.4 Procedure 6.4.1 Exercise 1: If...Else... Structure Write a program that first prompts a user to select a type of candy

Please solve using C++  Please solve using C++ 6.4 Procedure 6.4.1 Exercise 1: If...Else... Structure
Write a program that first prompts a user to select a type

6.4 Procedure 6.4.1 Exercise 1: If...Else... Structure Write a program that first prompts a user to select a type of candy from a list. Then it will prompt the user on how they will pay for the selected candy. The program will output the correct change based on the selected candy and payment entered. REQUIREMENT: Use the if..else statement for decision making (not the switch statement). Sample Output 1: Select a candy from the list below: 1 = Snarties ($0.50) 2 - M&M's Selection? 2 How are you going to pay for these M&M'a? 1 - Loonie 2 - Toonie Selection? 1 You will get the following change: $ 0.25 Your program should contain: 1. Your name, lab #. program description and comments for blocks of code: You can use the single line comment 1) or the multi line comment (...) 2. Good spacing of sections of code 3. Proper indentation of lines of code 4. Good variable names (descriptive, but not too long) NAIT CP 1149 Lab 6 - Conditional Statements Page 6,5 6.4.2 Exercise 2: Switch Structure Repeat Exercise 1. REQUIREMENT: Use the switch statement for the main decision making on the options selected (you may also need some if statements). Your program should contain: 1. Your name, lab #. program description and comments for blocks of code: You can use the single line comment (()) or the multi line comment (* 2. Good spacing of sections of code 3. Proper indentation of lines of code 4. Good variable names (descriptive, but not too long)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!