Line 31 -- i is generally a loop counter variable. There is no loop (as per your instructions), but there is also no recursion. Why does the "prime" function return a long int rather than a bool, particularly since it can only return a 0 or a 1?
Line 47 -- You call "prime", then do absolutely nothing with the return value.
Ditto line 67 -- why bother having a function return a value if you do nothing with it?
Line 69 -- break? The "break" statement is designed to break you out of a loop. The instructions say no loops and your program has none. "break" therefore makes no sense.
VernonDozier
Posting Expert
5,675 posts since Jan 2008
Reputation Points: 2,633
Solved Threads: 738
Skill Endorsements: 18