Answer Posted / darren chang
bool checkPrime(int input)
{
for(int i=2; i<(input/2); i++)
{
if((input%i)==0)
{
return false;
}
}
return true;
}
| Is This Answer Correct ? | 14 Yes | 7 No |
Post New Answer View All Answers
What is the difference between set and map in c++?
How would you differentiate between a pre and post increment operators while overloading?
What is #include iomanip?
What data encapsulation is in c++?
what is oops and list its features in c++?
What is object oriented programming (oop)?
What is a sequence in c++?
When can I use a forward declaration?
Can we distribute function templates and class templates in object libraries?
Define what is constructor?
Write a program to find the Fibonacci series recursively.
What new()is different from malloc()?
Why do we use using namespace std in c++?
What are shallow and deep copies?
What are static member functions?