Problem statement Boston number unable to find error

#include
using namespace std;
int sumofdig(int n)
{
int sum=0;
int rem;
while(n!=0)
{
rem=n%10;
n=n/10;
sum=sum+rem;
}
return sum;
}
int boston(int n)
{
int sum=0;
while(n%2==0)
{
sum=sum+2;
n=n/2;
}
for(int i=3;i*i<=n;i=i+2)
{
while(n%i==0)
{
sum=sum+i;
n=n/i;
}
}
if(n>2)
{
sum=sum+n;
}
return sum;
}
int main()
{
int n;
cin>>n;
if(n>1 && n<2147483647)
{
//pass
}
else{
return 1;
}
int sum1=sumofdig(n);
int sum2=boston(n);
if(sum1==sum2)
{
cout<<“1”;
}
else{
cout<<“0”;
}
return 0;
}

sir can you please help me to debug this Boston no code

The code does not handle the case where the input number n is less than or equal to 1, which leads to incorrect output.

You can refer this code

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.