Advertisement
osman1997

egn

Aug 30th, 2020
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. using System;
  2.  
  3. class Program
  4. {
  5. static void Main()
  6. {
  7.  
  8. bool isTrue = true;
  9. string egn = string.Empty;
  10.  
  11. while (isTrue)
  12. {
  13. egn = Console.ReadLine();
  14.  
  15. if (egn.Length == 10)
  16. {
  17. Console.Write("The egn is correct: ");
  18. isTrue = false;
  19. }
  20. else
  21. {
  22. Console.WriteLine("The egn is incorrect. Please, try again");
  23. continue;
  24. }
  25. }
  26. Console.WriteLine(egn);
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement