rado84

if-else-constructions

May 28th, 2016
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. using System;
  2. using System.Globalization;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7.  
  8. namespace if_old_OS
  9. {
  10. class Program
  11. {
  12. static void Main(string[] args)
  13. {
  14. Console.WriteLine("Enter an integer between 94 and 100.");
  15. var num = int.Parse(Console.ReadLine());
  16.  
  17. if (num < 94)
  18. {
  19. Console.WriteLine("Enter an integer between 94 and 100.");
  20. Console.ReadLine();
  21. }
  22.  
  23. if (num == 95)
  24. {
  25. Console.WriteLine("Windows 95 can not find your keyboard. Press F1 for help.");
  26. }
  27.  
  28. if (num > 100)
  29. {
  30. Console.WriteLine("Enter an integer between 4 and 100.");
  31. Console.ReadLine();
  32. }
  33.  
  34. if (num == 98)
  35. {
  36. Console.WriteLine("Windows 98 can not find your sound card. Press F1 after the beep.");
  37. }
  38.  
  39. }
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment