Facebook
From Round Lechwe, 6 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 326
  1. #include <iostream>
  2. #include <string> using namespace std;
  3. int main () {
  4. string nazwa;
  5. string haslo;
  6. cout << "Podaj nazwę użytkownika: " << "\n"; getline( cin, nazwa, '\n' );
  7. cout << "Podaj hasło: " << "\n";
  8. getline( cin, haslo, '\n' );
  9. if ( nazwa == "admin" && haslo == "xyzzy" ) {
  10. cout << "Dostęp przyznany" << "\n"; }
  11. else {
  12. return 0; }
  13. // Pracujemy dalej!
  14. }