#Function to check for prime
primefunc<-function(num){
ans=0
for(i in 1:num){
if(num%%i==0){
ans=ans+1
}
}
if(ans==2){
print("prime")
}
else{
print("not prime")
}
}
primefunc(557)
To embed this project on your website, copy the following code and paste it into your website's HTML: