woody1000

HW 1-1

Dec 15th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 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 HW
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. bool IsDoorOpen = false;
  14.  
  15. int userInput = Convert.ToInt32(Console.ReadLine());
  16.  
  17. if(userInput >18 || userInput == 18)
  18. {
  19. IsDoorOpen = true;
  20. Console.WriteLine("GO!");
  21. }
  22. else
  23. {
  24. Console.WriteLine("Nope!");
  25. }
  26. Console.Read();
  27. }
  28. }
  29. }
Add Comment
Please, Sign In to add comment