Character Type String Problem

Guide me how to approach this.

Hey @logic_0_found

  • Problem statement is quite easy you just need to tell whether the character entered is Lower case or Uppercase otherwise print I.
  • We can also compare characters directly without remembering the ascii codes.

        if(ch >= 'a' && ch <= 'z')
            return 'L';
        else if(ch >= 'A' && ch <= 'Z')
            return 'U';
        else
            return 'I';