Guest User

Untitled

a guest
May 20th, 2014
385
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using
  2. System;
  3.  
  4. using
  5. System.Collections.Generic;
  6.  
  7. using
  8. System.Linq;
  9.  
  10. using
  11. System.Text;
  12.  
  13. namespace
  14. ConsoleApplication1
  15.  
  16. {
  17. classProgram
  18.  
  19. {
  20. staticvoid Main(string[] args)
  21.  
  22. {
  23. int years;
  24.  
  25. int months;
  26.  
  27. int days;
  28.  
  29. Console.WriteLine("inserd date in this formad dd/mm/yyyy: ");
  30.  
  31. Console.WriteLine("Days: ");
  32.  
  33. days =
  34. int.Parse(Console.ReadLine());
  35.  
  36. Console.WriteLine("Months: ");
  37.  
  38. months =
  39. int.Parse(Console.ReadLine());
  40.  
  41. Console.WriteLine("Years: ");
  42.  
  43. years =
  44. int.Parse(Console.ReadLine());
  45.  
  46. if (years < 9999 && years > 0 && months > 1 && months < 12 && days > 1 && days < 31)
  47.  
  48. Console.WriteLine("date inserted correctly");
  49.  
  50. else
  51.  
  52.  
  53. Console.WriteLine("date inserted incorrect");
  54.  
  55. }
  56. }
  57. }
RAW Paste Data