Answer:
// 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;
//Completing the remaining Program
If (registerString== "Y")
{
discount();
}
else
{
noDiscount();
}
return 0;
} // End of main function
// Discount function
public void Discount()
{
cout << "You are preregistered and qualify for a 5 percent discount."
}
// noDiscount function
public void noDiscount()
{
cout << "Sorry, you did not preregister and do not qualify for a 5 percent discount."
}
Step-by-step explanation:
In the half given program, I add the the rest half in which i added-
The check condition to call the discount or nodiscount function on the basis of string input provided by the user.
The definition of discount function which call when the user is preregistered and prints the required discount message.
The definition of nodiscount function which call when the user is not preregistered and prints the required nodiscount message.