Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Cesar and Matt
- #include <iostream>
- #include <string>
- using namespace std;
- void info();
- void boot();
- void personinfo();
- void login();
- void options();
- void program();
- void finish();
- void login()
- {
- string username = "Cesarmatt";
- string password = "Prep";
- cout << "Welcome to the login screen. " << endl;
- cout << "Your username is Cesarmatt. Enter your username:";
- cin >> username;
- cout << "Your password is: Prep. Enter your password now:";
- cin >> password;
- if(username == "Cesarmatt" && password == "Prep")
- cout << "Welcome to the C++ simulator. Have fun!" << endl;
- cout << "Now that you have loged in you can choose what you would like to do."<< endl;
- options();
- cout<< "Before starting the program, please let us know who you are." << endl;
- }
- void personinfo()
- {
- struct info
- {
- char lname[20];
- char fname[20];
- int id_number;
- };
- {
- info info1;
- cout << "Enter information (In order as followed)" << endl;
- cout << "1.First Name:" << endl;
- cin >> info1.fname;
- cout << "2.Last Name:" << endl;
- cin >> info1.lname;
- cout << "3. ID (NUMBERS): " << endl;
- cin >> info1.id_number;
- cout << "The students information is as followed: " << endl;
- cout << "First name: " << info1.fname << endl;
- cout << "Last name: " << info1.lname << endl;
- cout << "ID: " << info1.id_number << endl;
- }
- void program ();
- {
- int main ();
- {
- // an array with 3 rows and 2 columns.
- int a[3][3] = { {10000,1}, {20000,2}, {30000,3}};
- // output each array element's value
- for ( int i = 0; i < 3; i++ )
- for ( int j = 0; j < 3; j++ )
- {
- cout << "a[" << i << "][" << j << "]: ";
- cout <<"Price:"<< a[i][j]<< endl;
- }
- exit (0);
- }
- }void finish();
- {
- int choice;
- cout << "Enter 1 if you would like to run a C++ program." << endl;
- cout << "Enter 2 if you would like to log of this computer and come back to the login screen." << endl;
- cout << "Enter 3 if you would like to shutdown your computer." << endl;
- cin >> choice;
- switch (choice)
- {
- case 1: program();
- case 2: cout << "You have chosen to log out of the computer please re-enter all the needed information." << endl;
- login();
- case 3: cout << "You have chosen to end the program. Thank you for using the C++ program." << endl;
- exit(0);
- }
- {
- }
- void boot();
- {
- boot(); { // the booting from drives and system check for moniter, keyboard, and mouse
- int choice;
- cout << "welcome to the os. this is a computer and operating system designed to help you track prices of cars.";
- cout << endl << "Checking to see if your mouse and keyboard are connected..."<< endl;
- cout << endl << "Now both your mouse and keyboard are connected. You can now access the system ";
- cout << endl << "Would you like to boot from your hard drive or ssd? type 1 for hdd or 2 for ssd";
- cin >> choice;
- if ( choice == 1 )
- {
- cout << "you will now boot from the hdd";
- login();
- }
- else if ( choice == 2) {
- cout << " you will now boot the sdd";
- login();
- }
- else {
- cout << "not a valid option try again";
- }
- }
- int main();
- {
- void info();
- boot();
- login();
- personinfo();
- program();
- options();
- finish();
- }
- }
- }
- exit (0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement