Advertisement
desislava_topuzakova

04. Password Guess

Jan 14th, 2023
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. //1. входни данни -> текст
  7. //2. проверка дали текстът съвпада с "s3cr3t!P@ssw0rd"
  8. //ако съвапада -> "Welcome"
  9. //ако не съвпада -> "Wrong password!"
  10.  
  11. string text;
  12. cin >> text;
  13.  
  14. if (text == "s3cr3t!P@ssw0rd")
  15. {
  16. cout << "Welcome";
  17. }
  18. else //противен случай: text != "s3cr3t!P@ssw0rd"
  19. {
  20. cout << "Wrong password!";
  21. }
  22. }
  23.  
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement