Originally Posted by
minty33
ok thanks for the response. i guess i'm wrong about how i can do this. what i was getting at by trying to do it different was NOT using the % mod. i thought i could test for it being an integer by using something along the lines of - if return 0 (since int main() is used). basically i thought since it is expecting an integer then return 0 would mean an integer was returned and if a integer was returned using the division method then that means no remainder (since float is not being used). in other words i wouldn't need to use % mod. so basically if it goes through all its divisions in the loop up to the number inputed and and is still return 1 then it is prime. am i wrong about this use of returen 0 and return 1. can they not be used to test the condition without remainder. basicall if its return 0 on any pass then its not prime, right?