Difference in ASCII code

ques–https://hack.codingblocks.com/contests/c/509/240
ans–https://ide.codingblocks.com/#/s/26747

not getting correct ans

Your code does not give difference numbers between the characters, correctly.
Try using type casting in your code. Please read and attempt the question again.