Replace them all two testcase failed

one tc passed and two failed//

#include
#include
using namespace std;
int newnum;

int checkzero(int r){
if(r==0){
r=5;
}
return r;
}

int main(){

int num;
cin>>num;
int x;

while(num>0){
    
    x=num%10;
    int rev=checkzero(x);
    num=num/10;
   
    static int count=0;
    count++;
    newnum=(rev*pow(10,count-1))+newnum;

}
cout<<newnum<<endl;

return 0;

}

@shivamraj53.sr,
check this u missed if no is 0 case else code is good : https://ide.codingblocks.com/s/656745

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.

one test case still failed

click on this link : https://ide.codingblocks.com/s/656745
u havent seen still

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.