In my opinion, that code is not true.
because of in the 15 line.
I assume that, when a==i --> a%i==0 --> break; --> line 16 will be never executed! please make me clearly !

Posting actual code might help instead of paraphrasing lines onesie twosie.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.