StringCompression problem

how to do this try alot but not getting full marks

hi piyush
Count the number of occurance of each character in given strings and print one character follow by number of occurance
you can refer this for your reference https://ide.codingblocks.com/s/49049