SAVE AS CPP
#include #include <stdlib.h> #include <string> using namespace std; main() { char x; string movieKind, movieName, customerName; int finAmount, nodays; cout << "Please Provide Customer Name:"; cin >> customerName; cout << "\n" cout << cout << cout << cout <<
"\n" " " " "
"Please provide Movie Description:" "\n" ; Enter 'R'for Regular Movie:" "\n" ; Enter 'C'for Children Movie:" "\n" ; Enter 'N'for New Released Movie:" "\n"; Enter 'E'for English Movie: " "\n" "\n";
cin >> x; cout<<"Please Provide Following Information:" "\n"; cout<< " Movie Name: "; cin>> movieName; cout<< " Number Of Days: "; cin>>nodays; if(x=='R') { } else if (x=='C') {
finAmount=40*nodays; movieKind="Regular";
finAmount=30*nodays; movieKind="Children"; } else if (x=='N') { } else if (x=='E') {
finAmount=100*nodays; movieKind="New Release";
finAmount=50*nodays; movieKind="Regular"; } else {
finAmount=0*nodays; movieKind="Invalid Movie Type";
} cout<<"
-----------------------------------------------------------" "\n";
cout<<" Customer Name:"<<customerName<< "\n"; cout<<" Movie Type : " <<movieKind<< "\n"; cout<<" Movie Name:"<<movieName<< "\n"; cout<<" Number of Days"<<nodays<< "\n"; cout<<" Your Rental Amount is: "<
Related Documents