SuperTutor

(15)

$15/per page/Negotiable

About SuperTutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Business & Finance See all
Accounting,Business & Finance,Economics,Engineering,HR Management,Math Hide all
Teaching Since: Apr 2017
Last Sign in: 327 Weeks Ago, 4 Days Ago
Questions Answered: 12843
Tutorials Posted: 12834

Education

  • MBA, Ph.D in Management
    Harvard university
    Feb-1997 - Aug-2003

Experience

  • Professor
    Strayer University
    Jan-2007 - Present

Category > Programming Posted 09 Jun 2017 My Price 12.00

Week 4

Week 4: Add loops to validate data. Add a menu to your program that allows users to use the
various features or exit the program.
Examples: In the programming tutorial, add a tutorial on working with loops. Then use loops to
validate user input and display an error message if they enter data outside the valid range. Use
a main loop to allow the user to keep selecting different tutorials until they decide to exit the
program. #include <iostream>
using namespace std;
int main()
{
char ch='Y';
int gateNo; // integer for gate number
cout << "Movies with their time and gate..." << endl;
while( ch=='y' || ch=='Y'){
//user prompt for gate number
cout << endl <<"Please enter the Gate number : ";
cin >> gateNo;
// details of movies...
if (gateNo == 1) {
cout << endl << "Movie: Beauty and the beast" << endl;
cout << "Time: 1:00pm" << endl;
cout << "Gate: 1" << endl;
}
else if (gateNo == 2) {
cout << endl << "Movie: The Circle" << endl;
cout << "Time: 3:00pm" << endl;
cout << "Gate: 2" << endl;
}
else if (gateNo == 3) {
cout << endl << "Movie: Boss Baby" << endl;
cout << "Time: 5:00pm" << endl;
cout << "Gate: 3" << endl;
}
else {
cout << "Please enter a valid gate number !" << endl;
} } // user prompt to continue
cout << endl << "To cont... press[Y/N]: ";
cin >> ch; system("pause"); return 0;

Attachments:

Answers

(15)
Status NEW Posted 09 Jun 2017 06:06 AM My Price 12.00

-----------

Attachments

file 1496990474-Solutions file.docx preview (51 words )
S-----------olu-----------tio-----------ns -----------fil-----------e -----------Hel-----------lo -----------Sir-----------/Ma-----------dam----------- T-----------han-----------k y-----------ou -----------for----------- yo-----------ur -----------int-----------ere-----------st -----------and----------- bu-----------yin-----------g m-----------y p-----------ost-----------ed -----------sol-----------uti-----------on.----------- Pl-----------eas-----------e p-----------ing----------- me----------- on----------- ch-----------at -----------I a-----------m o-----------nli-----------ne -----------or -----------inb-----------ox -----------me -----------a m-----------ess-----------age----------- I -----------wil-----------l b-----------e q-----------uic-----------kly----------- on-----------lin-----------e a-----------nd -----------giv-----------e y-----------ou -----------exa-----------ct -----------fil-----------e a-----------nd -----------the----------- sa-----------me -----------fil-----------e i-----------s a-----------lso----------- se-----------nt -----------to -----------you-----------r e-----------mai-----------l t-----------hat----------- is----------- re-----------gis-----------ter-----------ed -----------onÂ----------- th-----------is -----------web-----------sit-----------e -----------Tha-----------nk -----------you----------- -----------
Not Rated(0)