no = io.read("*n")
x = 0
print("Factors of",no,"other than 1 and",no,"are as follows:")
for i = 2,no-1,1 
do
    if(no%i==0)
    then
        x = x+1
        print(i)
    end
end
if(x==0)
then
    print("prime")
else
    print("composite")
end

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: