Advertisement
Guest User

Untitled

a guest
Jan 21st, 2018
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Zadanie010
  4. {
  5. class Program
  6. {
  7.  
  8.  
  9. static bool CzyWKolejnosci(char a, char b, char c)
  10. {
  11.  
  12. int d = 0;
  13. int e = 0;
  14. int f = 0;
  15.  
  16. if(a>=65 && a <=90)
  17. {
  18. d = 32;
  19. }
  20.  
  21. if (b >= 65 && b <= 90)
  22. {
  23. e = 32;
  24. }
  25.  
  26. if (c >= 65 && c <= 90)
  27. {
  28. f = 32;
  29. }
  30.  
  31. if (Char.IsLetter(a) == true && Char.IsLetter(b) == true && Char.IsLetter(c) == true)
  32. {
  33. if (a + d< b+e&& b+e < c+f)
  34. {
  35. return true;
  36. }
  37. else
  38. return false;
  39. }
  40. else
  41. return false;
  42. }
  43.  
  44.  
  45.  
  46. static void Main(string[] args)
  47. {
  48.  
  49.  
  50.  
  51. Console.WriteLine( CzyWKolejnosci('A', 'd', 'C') );
  52. Console.ReadKey();
  53. }
  54. }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement