String compression under string

could any one please debug my code .
It’s not printing the desire output .
code --> https://ide.codingblocks.com/s/254267

in your code instead of printing s[i] you were printing the entire string.
Corrected Code