Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ExercisesProject.Exercises
  8. {
  9. class EnterPassword
  10. {
  11. public static void Main()
  12. {
  13. int user, pass;
  14. do
  15. {
  16. Console.Write("Enter a user :");
  17. user = Convert.ToInt32(Console.ReadLine());
  18.  
  19. Console.Write("Enter a password :");
  20. pass = Convert.ToInt32(Console.ReadLine());
  21.  
  22. if ((user != 12 || (pass != 1234)))
  23. Console.Write("Login Error");
  24. }
  25. while ((user != 12 || (pass != 1234)));
  26. Console.WriteLine("Login successful");
  27. }
  28.  
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement