Cs201 Assignment 1 Solution Vuabid

  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Cs201 Assignment 1 Solution Vuabid as PDF for free.

More details

  • Words: 168
  • Pages: 2
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