Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- using namespace std;
- void menu (){
- int x, choice;
- char key;
- string un[10];
- string pw[10];
- do
- {
- cout<<"MENU"<<endl;
- cout<<"\n1. SIGN UP";
- cout<<"\n2. OUTPUT";
- cout<<"\n3. Exit";
- cout<<"\n\nChoose one: "<<endl;
- cin>>choice;
- switch(choice)
- {
- case 1:
- system("CLS");
- for(x=0; x<10; x++)
- {
- cout<<"Enter username: ";
- cin>>un[x];
- cout<<"Enter password: ";
- cin>>pw[x];
- cout<<endl;
- }
- break;
- case 2:
- system("CLS");
- for(x=0; x<10; x++)
- {
- cout<<"Username: "<<un[x];
- cout<<"\nPassword: "<<pw[x]<<endl;
- cout<<endl;
- }
- break;
- case 3:
- exit(0);
- break;
- default:
- cout<<"Invalid choice. Try again.";
- }
- cout<<"\nPress B to go back to Menu. ";
- cin>>key;
- system("CLS");
- }while(key=='b' || key=='B');
- }
- int main(int argc, char *argv[]) {
- menu ();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement