Advertisement
royroy23

Untitled

Jan 28th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 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 ConsoleApplication23
  8. {
  9. class Program
  10. {
  11. static bool iden (char a)
  12. {
  13. char n;
  14. bool v = false;
  15. n = 'A';
  16. while (n <= 'z')
  17. {
  18. if (n == a)
  19. {
  20. v = true;
  21. n = '{';
  22. }
  23. n++;
  24. }
  25. return v;
  26. }
  27.  
  28. static void Main(string[] args)
  29. {
  30. char a;
  31. bool tf;
  32. Console.WriteLine("Enter a character: ");
  33. a = char.Parse(Console.ReadLine());
  34. tf = iden(a);
  35. Console.WriteLine(tf);
  36. }
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement