I need help

Hey guys. I need help on my c++ project. My lecturer asked me to include loading and login screen. I've searched google for the code but he wants something different. So, can someone help me with my problem? I really appreciate the knowledge that you would share to me and the others. Thank you so much in advance.
Please post the assignment and the code that you've written so far.
#include <iostream.h>
#include <conio.h>

main()
{
int sentinal = 0;
float totalPrice = 0.00;
while(sentinal !=-99)
{
char code = '@';
char package [20] = "IMRAN HEMSEM";
float adult = 0.0;
float child = 0.0;
int noAdult = 0;
int noChildren = 0;
float total = 0.00;
bool display = true;

cout << "-------------------" << endl;
cout << "| PACKAGE | CODE |" << endl;
cout << "-------------------" << endl;
cout << "| ISTANBUL | X |" << endl;
cout << "| BEIJING | Y |" << endl;
cout << "| TOKYO | Z |" << endl;
cout << "-------------------" << endl;
cout << endl;

cout << " YOUR CODE PACKAGE = " ;
cin >> code;
cout << " NO OF ADULTS = ";
cin >> noAdult;
cout << " NO OF CHILDREN = ";
cin >> noChildren;
cout<< endl;


switch(code)
{
case 'X':
case 'x':
strcpy(package,"ISTANBUL");
adult = 4000.00;
child = 2100.00;
break;

case 'Y':
case 'y':
strcpy(package,"BEIJING");
adult = 2300.00;
child = 1400.00;
break;

case 'Z':
case 'z':
strcpy(package,"TOKYO");
adult = 3800.00;
child = 1800.00;
break;

default:
cout << " INVALID CODE-PACKAGE" <<endl;
display = false;
break;
}
if(display == true);
{
total = (noAdult * adult) + (noChildren * child);

cout << " THE PACKAGE = " << package << endl;
cout << " THE NUMBER OF ADULT = " << noAdult << endl;
cout << " THE NUMBER OF CHILDREN = " << noChildren << endl;
cout << " THE PRICE OF CUSTOMER = RM " << total << endl;
cout << endl;

totalPrice = totalPrice + total;
}

cout << " TO EXIT ENTER [-99] = " ;
cin >> sentinal;
cout << endl;
}
cout << endl;
cout << " THE TOTAL PRICE OF TICKET SOLD = RM " << totalPrice << endl;

getch();
}
Create a function to prompt for the login info. Call it at the beginning of main(). You could loop until they enter a valid login, or give up after some number of tries and cause the program to exit.

What mentioned that the program should "include loading." Can you elaborate on that? I don't know what you mean?
What I mean is I need help on how to write the coding for loading screen and user login. My lecturer asked me to include those two in my project. He wants the loading screen to be other than loading bar.
I see. So create a function called loading() that displays some sort of "loading..." message. Since there really is no loading time involved, you'll have to call sleep() to wait a second or 2 before moving on to the login phase.
ok,thanks a lot dhayden
Topic archived. No new replies allowed.