Advertisement
Guest User

poprawka xd

a guest
Jul 4th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <time.h>
  4. #include <conio.h>
  5. #include <windows.h>
  6.  
  7. using namespace std;
  8. char x;
  9. const string user="Mike";
  10. const int pass=12345;
  11. int y;
  12. int main()
  13. { while(1){
  14. cout<<"MAIN MENU"<<endl<<"---------"<<endl<<"1.Zaloguj sie."<<endl<<"2.Wyjscie z programu"<<endl;
  15.  
  16. x=getch();
  17. switch(x)
  18. {
  19. case '1':
  20. cout<<endl<<"Witaj "<<user<<", podaj swoje haslo, aby wejsc do systemu:";
  21. cin>>y;
  22. while(y!=12345)
  23. {
  24. cout<<"Bledne haslo, sprobuj ponownie:";
  25. cin>>y;
  26. }
  27. case '2':
  28. exit(0);
  29. break;
  30. default:
  31. cout<<"Error!";
  32. }
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement