Advertisement
Gentoo

Permissions

Nov 5th, 2011
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace @if
  7. {
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. Console.WriteLine("What is your name?");
  13. string Name = Console.ReadLine();
  14. if (Name.ToLower() == "sam")
  15. {
  16. Console.WriteLine("Welcome Sam! What is your password?");
  17. if (Console.ReadLine() == "onlivegamer")
  18. {
  19. Console.WriteLine("You have root permissions!");
  20. }
  21. else
  22. {
  23. Console.WriteLine("Wrong password! Terminating....");
  24.  
  25. }
  26. else if (Name.ToLower() == "jason")
  27. {
  28. Console.WriteLine("You have limited permissions");
  29. }
  30. Console.ReadLine();
  31. }
  32. }
  33. }
  34. }
  35.  
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement