c++ program that accepts customer data

,calculates discount based on the age and ticket price depending on the schemes offered by transport company.

Make a data structure (or simply a table) to store the pricing schemes.

Use a pseudocode to plan the program flow. It should roughly look like the following:

1. Initialize pricing data
2. Prompt for input, e.g. number of persons, category/destination, etc.
3. Perform calculations
4. Print results/summary
5. Ask if more calculations needed. If yes, go back to step 2.
6. End session.

To create a C++ program that accepts customer data, calculates discounts based on age, and calculates ticket prices based on the schemes offered by a transport company, you can follow these steps:

1. Start by including the necessary C++ libraries:
```cpp
#include <iostream>
using namespace std;
```

2. Define a struct to store customer data:
```cpp
struct Customer {
string name;
int age;
};
```

3. Define the available schemes and their corresponding discount rates:
```cpp
const double DISCOUNT_RATE_CHILD = 0.5; // 50% discount for children
const double DISCOUNT_RATE_SENIOR = 0.7; // 30% discount for seniors
// Add more schemes if needed
```

4. Define the main function:
```cpp
int main() {
// Create a Customer object to store the customer data
Customer customer;

// Accept customer data from the user
cout << "Enter the customer name: ";
getline(cin, customer.name);
cout << "Enter the customer age: ";
cin >> customer.age;

// Calculate the discount based on the customer's age
double discountRate = 1.0; // Default discount rate for adults
if (customer.age <= 5) {
discountRate = DISCOUNT_RATE_CHILD;
} else if (customer.age >= 60) {
discountRate = DISCOUNT_RATE_SENIOR;
}

// Accept the ticket price from the user
double ticketPrice;
cout << "Enter the ticket price: ";
cin >> ticketPrice;

// Calculate the discounted ticket price
double discountedPrice = ticketPrice * discountRate;

// Display the customer data and the discounted ticket price
cout << "Customer Name: " << customer.name << endl;
cout << "Customer Age: " << customer.age << endl;
cout << "Discounted Ticket Price: " << discountedPrice << endl;

return 0;
}
```

5. Compile and run the program. When prompted, enter the customer's name, age, and ticket price. The program will calculate the discount based on the age and display the customer data along with the discounted ticket price.

Note: This program assumes that the customer's age is an integer and the ticket prices are in dollars. You can modify the code according to your specific requirements and add more schemes if needed.