Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- int dancers;
- cin >> dancers;
- double points;
- cin >> points;
- string season, destination;
- cin >> season >> destination;
- double totalSum = dancers * points;
- if (destination == "Abroad") {
- totalSum *= 1.50;
- if (season == "summer") {
- totalSum *= 0.90;
- }
- else {
- totalSum *= 0.85;
- }
- }
- else {
- if (season == "summer") {
- totalSum *= 0.95;
- }
- else {
- totalSum *= 0.92;
- }
- }
- printf("Charity - %.2f\n", totalSum * 0.75);
- printf("Money per dancer - %.2f\n", totalSum * 0.25 / dancers);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement