#include <iostream>
int main() {
std::cout << "Enter number of A seats: ";
int numberofA_Seats;
std::cin >> numberofA_Seats;
std::cout << "Enter price per A seat: ";
int priceperA_Seat;
std::cin >> priceperA_Seat;
std::cout << "Enter number of B seats: ";
int numberofB_Seats;
std::cin >> numberofB_Seats;
std::cout << "Enter price per B seat: ";
int priceperB_Seat;
std::cin >> priceperB_Seat;
std::cout << "Enter number of C seats: ";
int numberofC_Seats;
std::cin >> numberofC_Seats;
std::cout << "Enter price per C seat: ";
int priceperC_Seat;
std::cin >> priceperC_Seat;
int totalCost = numberofA_Seats * priceperA_Seat +
numberofB_Seats * priceperB_Seat +
numberofC_Seats * priceperC_Seat;
std::cout << "Total cost: " << totalCost << std::endl;
system("pause");
return 0;
}
Comments
Leave a comment