Write a program to find the nearest smaller prime number for a given integer;

Fbody commented: We don't do homework for those that don't try. And don't hijack threads. Start your own. -1

Recommended Answers

All 3 Replies

Write a program to find the nearest smaller prime number for a given integer;

commented: Is it because the original message was so effective? -1

Let's post some of your initial work and we shall assist you on any problem which you may have. Or at least, post some of your thought on how you're gonna solve the problem.

First do the initial code to find the nearest smaller prime number of an given number(int).
Then we will try to find what's wrong with your code.

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.