Why can i not solve in this way?

here is my code β€”> https://ide.codingblocks.com/s/450410

@chandreshmaurya you have defined A,a,Z,z as char variable they can’t be used as actual character like β€˜A’, while comparing use characters with quotes like if(ch>=β€˜A’ and ch<=β€˜Z’) and so.

sir, here is said that don’t use ascii code. is it right to solve with this method ?

yes we are directly using characters not their ascii codes so this is right method.