Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <time.h>
- #include <conio.h>
- #include <windows.h>
- using namespace std;
- char x;
- const string user="Mike";
- const int pass=12345;
- int y;
- int main()
- { while(1){
- cout<<"MAIN MENU"<<endl<<"---------"<<endl<<"1.Zaloguj sie."<<endl<<"2.Wyjscie z programu"<<endl;
- x=getch();
- switch(x)
- {
- case '1':
- cout<<endl<<"Witaj "<<user<<", podaj swoje haslo, aby wejsc do systemu:";
- cin>>y;
- while(y!=12345)
- {
- cout<<"Bledne haslo, sprobuj ponownie:";
- cin>>y;
- }
- case '2':
- exit(0);
- break;
- default:
- cout<<"Error!";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement