Advertisement
Guest User

Untitled

a guest
Nov 3rd, 2016
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 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 ConsoleApplication1
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. string RealUsername = "root";
  14. string RealPassword = "passwd";
  15. Console.Write("Username: ");
  16. string Username = Console.ReadLine();
  17. Console.Write("Password: ");
  18. string Password = Console.ReadLine();
  19. if (Username == RealUsername) ;
  20. {
  21. if (Password == RealPassword);
  22. {
  23. Console.WriteLine("Correct Login");
  24. }
  25. else;
  26. {
  27. Console.WriteLine("Incorrect Login");
  28. }
  29. }
  30. else;
  31. {
  32. Console.WriteLine("Incorrect Login");
  33. }
  34.  
  35. }
  36. }
  37. }
  38.  
  39. Invalid expression term 'else'
  40.  
  41. if (Username == RealUsername) ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement