Corne commented on a Page, Prime numbers  -  Jul 05, 2005

I was thinking to what you said about \'2\' and \'3\' and I thought I can get rid of loop and I will divide $1 to 2 and 3 and if the result is an integer number then the number is not prime, else is prime but what would happen if the reuslt of $1 / 2 or /3 is not an integer number and $1 is not a prime number (for example 25). If the reuslt of $1 / 2 is not an integer number then obviously $1 / 4 is not an integer number either and if I wont do that check I\'ll have to check if the divider is a multiple of 2/3 so I\'ll still have to do a check and its the same work. (hopefully I\'m not wrong :) )
(updated the code)

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.