Advertisement
desislava_topuzakova

04. Password Guess

Jun 12th, 2022
1,161
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.73 KB | None | 1 0
  1. using System;
  2.  
  3. namespace _04._Password_Guess
  4. {
  5.     internal class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             //1. парола (текст) -> входни данни
  10.             //2. проверка дали паролата == "s3cr3t!P@ssw0rd"
  11.             //2.1. ако съвпада -> печатаме "Welcome"
  12.             //2.2. ако не съвпада -> печатаме "Wrong password"
  13.  
  14.             string password = Console.ReadLine();
  15.             if (password == "s3cr3t!P@ssw0rd")
  16.             {
  17.                 Console.WriteLine("Welcome");
  18.             }
  19.             else
  20.             {
  21.                 Console.WriteLine("Wrong password!");
  22.             }
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement