#include <iostream>
#include <iomanip>
using namespace std;
int main() {
return 0;
}
using namespace std;
const float ADULT_TICKET_PRICE = 8.00;
const float OTHER_TICKET_PRICE = 6.50;
int main();
int adults = 0,
others = 0;
float adultCost = 0,
otherCost = 0,
totalTicketCost = 0;
cout and cin statements.
cout << "Enter the number of adults: "; cin >> adults; cout << endl; cout << "Enter the number of others: "; cin >> others; cout << endl;
adultCost = adults * ADULT_TICKET_PRICE; otherCost = others * OTHER_TICKET_PRICE; totalTicketCost = adultCost + otherCost;
cout << fixed << setprecision(2);
cout << "For " << adults << " adults and "
<< " others the price will be:" << endl;
cout << "\tAdult Tickets\t$" << adultCost << endl;
cout << "\tOther Tickets\t$" << otherCost << endl;
cout << endl;
cout << "\tTotal Cost\t$" << totalTicketCost << endl;
prog.cpp
g++ -o prog prog.cpp
prog