print "enter a number: ";
$in = <>;
chomp $in;
print &prime($in);
print "\n";
sub prime{
for($i=2;$i<($_[0]/2+1);$i++){
if($_[0]%$i ==0){return "not prime\n"}
}
return "prime\n";
}
is this code for c++ language?..