You could improve the following loop by adding a break command:
for(i=2; i<number; i++){
if(number%i == 0)
{
isprime = false;
break;
}
}
And as Karsten has already mentioned the expression
isidentic == false;
, in the last loop of the
hasidenticdigits
function, does not change the variable.