Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- string destination, dates;
- getline(cin, destination);
- cin >> dates;
- int night;
- cin >> night;
- double sumPerNight = 0;
- if (destination == "France") {
- if (dates == "21-23") {
- sumPerNight = 30;
- }
- else if (dates == "24-27") {
- sumPerNight = 35;
- }
- else if(dates == "28-31") {
- sumPerNight = 40;
- }
- }
- else if (destination == "Italy") {
- if (dates == "21-23") {
- sumPerNight = 28;
- }
- else if (dates == "24-27") {
- sumPerNight = 32;
- }
- else if (dates == "28-31") {
- sumPerNight = 39;
- }
- }
- else if (destination == "Germany") {
- if (dates == "21-23") {
- sumPerNight = 32;
- }
- else if (dates == "24-27") {
- sumPerNight = 37;
- }
- else if (dates == "28-31") {
- sumPerNight = 43;
- }
- }
- printf("Easter trip to %s : %.2f leva.\n", destination.c_str(), sumPerNight * night);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement