This program determines if an art show attendee gets a 5% discount for preregistering. // Input: Interactive// Output: A statement telling the user if they get a discount or no discount. #include #include using namespace std;void discount();void noDiscount();int main() { string registerString; cout << "Did you preregister? Enter Y or N: "; cin >> registerString; // Test here. If = Y, call discount(), else call noDiscount(). return 0;} // End of main function// Write discount function here// Write noDiscount function here

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 1TF: Mark the following statements as true or false: a. To use a predefined function in a program, you...
icon
Related questions
Question

// ArtShowDiscount.cpp - This program determines if an art show attendee gets a 5% discount for preregistering. // Input: Interactive// Output: A statement telling the user if they get a discount or no discount. #include <iostream>#include <string>using namespace std;void discount();void noDiscount();int main() { string registerString; cout << "Did you preregister? Enter Y or N: "; cin >> registerString; // Test here. If = Y, call discount(), else call noDiscount(). return 0;} // End of main function// Write discount function here// Write noDiscount function here

qualify for a 5 percent discount." The source code file provided for this lab
includes the necessary variable declarations and the input statement. Comments are
Lab 9-1: Writing Functions with No Parameters
noDiscount() that displays the message, "Sorry, you did not preregister and do not
discount." If the user has not preregistered, the program should call a function named
that displays the message, "You are preregistered and qualify for a 5 percent
parameters. The program asks the user if he or she has preregistered for tickets to an art
show. If the user has preregistered, the program should call a function named discount()
In this lab, you complete a partially prewritten C++ program that includes functions with no
Lab . ou complete a partially prewritten C++ program that includes functions with no
asks the user if he or she has preregistered for tickets to an art
paraete user has preregistered, the program should call a function named discount(O
showanlays the message, "You are preregistered and qualify for a 5 percent
%3D
a
niscount () that displays thne message, "Sorry, you did not preregister and do not
lify for a 5 percent discount." The source code file provided for this lab
rdes the necessary variable declarations and the input statement. Comments are
included in the file to help you write the remainder of the program
.
1. Open the source code file named ArtShowDiscount.cpp using Notepad or the text
editor of your choice.
2. Write the C++ statements as indicated by the comments.
3. Save this source code file in a directory of your choice, and then make that directory
your working directory.
4. Compile the source code file, ArtShowDiscount.cpp.
5. Execute the program.
Transcribed Image Text:qualify for a 5 percent discount." The source code file provided for this lab includes the necessary variable declarations and the input statement. Comments are Lab 9-1: Writing Functions with No Parameters noDiscount() that displays the message, "Sorry, you did not preregister and do not discount." If the user has not preregistered, the program should call a function named that displays the message, "You are preregistered and qualify for a 5 percent parameters. The program asks the user if he or she has preregistered for tickets to an art show. If the user has preregistered, the program should call a function named discount() In this lab, you complete a partially prewritten C++ program that includes functions with no Lab . ou complete a partially prewritten C++ program that includes functions with no asks the user if he or she has preregistered for tickets to an art paraete user has preregistered, the program should call a function named discount(O showanlays the message, "You are preregistered and qualify for a 5 percent %3D a niscount () that displays thne message, "Sorry, you did not preregister and do not lify for a 5 percent discount." The source code file provided for this lab rdes the necessary variable declarations and the input statement. Comments are included in the file to help you write the remainder of the program . 1. Open the source code file named ArtShowDiscount.cpp using Notepad or the text editor of your choice. 2. Write the C++ statements as indicated by the comments. 3. Save this source code file in a directory of your choice, and then make that directory your working directory. 4. Compile the source code file, ArtShowDiscount.cpp. 5. Execute the program.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning