How to print true or false using bool operator?

i have written the code for it

but when i run the code it shows 1 or 1 and also prints 64. please look into my code.

hi @Anku47 you can it like

bool isarmstrong = armstrong(371);
if (isarmstrong) {
    cout << "true";
} 
else {
    cout << "false";
}