So I am making a script that tells me what number is a prime number.
local dividend= 1
local divisor= 1
function divide()
local result= dividend/divisor
--if result is not a decimal then
--if result is not 1 or "dividend" then
print(dividend.."is not a prime number")
else
print(dividend.."is a prime number")
dividend= dividend + 1
divisor= 1
end
end
divisor= divisor + 1
end
while true do
divide()
wait()
end
In line 7, I don't know how to find if "result" has a decimal, as per the question says. In line 8, as soon as I type "not", it gets a red line under it.
Please note that I put the end and else just for convenience so please don't tell me that's the one incorrect.

2 comments
Yes, thank you. Now I shall proceed to find the next largest prime number there is to improve the security of banks. And I might get a prize for it too, but who knows :)
Huh, well good luck, glad to help you on your way!