Switch to edit mode.
Name(s): isprime1: ft = ftime()
2: what = toint(dobjstr)
3: test = toint(sqrt(tofloat(dobjstr)))
4: for a in [2..test]
5: b = what / a
6: if (a * b == what)
7: return player:tell("You lose: ", a, " * ", b, " = ", what)
8: endif
9: endfor
10: player:tell("It's prime.")
11: player:tell("[", ftime() - ft, " seconds.]")
12: "Last modified by Dax (#789) on Tue May 3 14:09:39 2005 MDT."