#include <iostream>
int main() {
std::cout << "How many type A tickets sold?" << std::endl;
int numberofA_Seats;
std::cin >> numberofA_Seats;
std::cout << "How much does one such ticket cost?" << std::endl;
int priceperA_Seat;
std::cin >> priceperA_Seat;
std::cout << "How many type B tickets sold?" << std::endl;
int numberofB_Seats;
std::cin >> numberofB_Seats;
std::cout << "How much does one such ticket cost?" << std::endl;
int priceperB_Seat;
std::cin >> priceperB_Seat;
std::cout << "How many type C tickets sold?" << std::endl;
int numberofC_Seats;
std::cin >> numberofC_Seats;
std::cout << "How much does one such ticket cost?" << std::endl;
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
Dear Cole, Questions in this section are answered for free. We can't fulfill them all and there is no guarantee of answering certain question but we are doing our best. And if answer is published it means it was attentively checked by experts. You can try it yourself by publishing your question. Although if you have serious assignment that requires large amount of work and hence cannot be done for free you can submit it as assignment and our experts will surely assist you.
Briefly explain the roles of Instruction Registers and Program Counters.
Dear Qweku, You're welcome. We are glad to be helpful. If you liked our service please press like-button beside answer field. Thank you!
I learnt a lot from your page , it is very helpful
Leave a comment