Is armstrong number 3 tc failed out of 7

#include
#include
using namespace std;

int num;
int count=0;
int newnum=0;

void checkArmstrong(int n,int p){
int oldnum=n;
while(n>0){
int x=n%10;
newnum=pow(x,p)+newnum;
n=n/10;
}
if(newnum==oldnum){
cout<<“true”<<endl;
}
else
cout<<“false”<<endl;
}

int main(){

cin>>num;

while(num>0){
    num=num/10;
    count++;
    
}
checkArmstrong(num,count);

return 0;

}

@shivamraj53.sr, please send the code in cb ide next time its difficult from here

@shivamraj53.sr, check this : https://ide.codingblocks.com/s/656872

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.