#include <iostream>
using namespace std;
int main()
{
int price;
cout<<"\nEnter initial price: ";
cin>>price;
int days;
cout<<"\nEnter the difference between the booking day and the flight day: ";
cin>>days;
switch(days){
case 7:
price=price;
break;
case 6:
price=price*1.1;
break;
case 5:
price=price*1.15;
break;
case 4:
price=price*1.17;
break;
case 3:
price=price*1.2;
break;
case 2:
price=price*1.15;
break;
case 1:
price=price*2;
break;
}
cout<<"\nThe final price = "<<price;
return 0;
}
Comments
Leave a comment