/* Program 1, Compute the price of movie tickets. Programmer: Dan Bennett July 12, 2021 This program was written as an example for the first two chapters. */ #include #include using namespace std; const float ADULT_TICKET_PRICE = 8.0; const float OTHER_TICKET_PRICE = 6.5; const int other {4}; int main() { int helloWorld; int hello_world; int helloworld; int adultCount = 0; // the number of adults int childCount {0}; int otherCount = 0; // the number of others int a {0}, b{1}, c{2}; int d, e {5}, f = 7; float adultCost = 0, // the cost of adult tickets otherCost = 0, // the cost of other tickets totalCost = 0; // the total ticket cost // Get the number of adults and others. cout << "Enter the number of adult tickets: "; cin >> adultCount; cout << "Enter the number of other tickets: "; cin >> otherCount; // calculate the cost for adults and others. adultCost = ADULT_TICKET_PRICE * adultCount; otherCost = OTHER_TICKET_PRICE * otherCount; totalCost = adultCost + otherCost; /* cout << "The adult count is " << adultCount << endl; cout << "The other count is " << otherCount << endl; */ cout << 4 + 5 << endl; /* Print the final resutls */ cout << "Adult Cost: " << adultCost << endl; cout << "Other Cost: " << otherCost << endl; cout << "Total Cost: " << totalCost << endl; return 0; }