Advertisement
osman1997

egn

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