question–>
https://hack.codingblocks.com/app/contests/1617/380/problem
code–>
Test cases not passes for string compression
Hey @sheikhhaji18
Count can be gretrer than 9 in that case count +‘0’ wont work
u have to convert it to string and then add char by char
now it is working thx
used to_string() from string header
is there any other ways to convert 2digit and 3 digits numbers to string or character array ?
just iterate over them
string ans="";
while(num>0){
ans=('0'+num%10)+ans;
num=num/10;
}
I don’t think there is any other direct way 
but this will give reverse order right
No it should give correct order because I am appending ans later here
Here try this in ide
#include <iostream>
using namespace std;
int main() {
int num=1234;
string ans="";
while(num>0){
ans=(char)('0'+num%10)+ans;
num=num/10;
}
cout<<ans<<endl;
}
thx for your reply 
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.