do you know how to code in C++? If not, I would recommend you to learn. I hope you know what prime number is and when you know to code C++, you will automatically be able to code your program. And if you are having problem with code if you have written, then post here and we will try to figure out where you made the mistake