#include<iostream>
using namespace std;
int main()
{
string name;
double cprice;
int duration;
cout<<"\nEnter name: ";
cin>>name;
cout<<"\nEnter current price: ";
cin>>cprice;
cout<<"\nEnter duration: ";
cin>>duration;
double retail_price;
if(duration<=7)
retail_price=1.20*cprice;
else if(duration>7 && duration<=14)
retail_price=1.15*cprice;
else if(duration>14)
retail_price=1.02*cprice;
cout<<"\nName: "<<name;
cout<<"\nCurrent price: "<<cprice;
cout<<"\nDuration: "<<duration;
cout<<"\nRetail price: "<<retail_price;
return 0;
}
Comments
Leave a comment