It is required from A to get A , from 2 to get B , from 3 to get C and so on to Z. How to do it?

  • 3
    (char)('A' + x - 1) - Andrey NOP
  • @AndreyNOP: Well, uh, why not the answer? Well, yes, the simple answer. - VladD

1 answer 1

 (char)('A' + x - 1) 

Thank you @ AndreyNOP for the answer.