English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

1 answers

Write a small loop that checks the parameter for any remainder of all odd numbers lower than itself except for one.

Something like (pseudocode)

for loopctr in 3.. parameter step 2
if parameter % loopctr = 0
it's not a prime
end loop

2007-03-01 05:04:58 · answer #1 · answered by BigRez 6 · 0 0

fedest.com, questions and answers