CODE
//Timm DeSalis
//Final Assignment
#include <iostream>
#include <iomanip>
#include <vector>
using namespace std;
int main()
{
//Row Prices
const int ROW_NUMBER = 5; //number of rows
vector<double> seatPrice(ROW_NUMBER); // vector of doubles
int index; //loop counter
//input seat prices
for ( index = 0; index < ROW_NUMBER; index++)
{
cout << "Please enter the price for row " << (index + 1) << ": ";
cin >> seatPrice[index];
cout << endl;
}
//seat chart
const char FULL = '*';
const char OPEN = '#';
const int r = 5;
const int c = 11;
char chart[5][11] = {OPEN};
cout << "The seats appear # empty and * if occupied:\n";
cout << "\t\tSeats\n";
cout << " 1 2 3 4 5 6 7 8 9 10\n";
for(int i = 0; i < 5; i++)
{
cout << "Row " << i;
for(int c2 = 0; c2 < 10; c2++)
{
cout << " " << OPEN;
}
cout <<endl;
}
//selcting seats and price of amount
int rowcount, seat, howMany;
cout << "Please select which row you would like to sit in: ";
cin >> rowcount;
cout << "Please select which seat in that row you would like to sit in: ";
cin >> seat;
//pricing
double cost;
cost = seatPrice[rowcount] * 1;
cout << "The price of that ticket is: " << cost << endl;
return 0;
}
im having trouble with how to price the ticket then have the seatin chart change to have the chart change so the seat become full then have it saved