Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- string agency;
- getline(cin, agency);
- int ticket, kidTicket;
- cin >> ticket >> kidTicket;
- double ticketPrice, service;
- cin >> ticketPrice >> service;
- double totalAdult = (ticketPrice + service) * ticket;
- double totalKid = (0.3 * ticketPrice + service) * kidTicket;
- double total = (totalAdult + totalKid) / 5;
- printf("The profit of your agency from %s tickets is %.2f lv.", agency.c_str(), total);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement