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
If I is an integer variable, which is faster ++i or i++?
Is c++ a programming language?
What is the basic structure of a c++ program?
Is java easier than c++?
What is the use of structure in c++?
What is an undefined behavior and sequence points
If a round rectangle has straight edges and rounded corners, your roundrect class inherits both from rectangle and from circle, and they in turn both inherit from shape, how many shapes are created when you create a roundrect?
What are libraries in c++?
What is data binding in c++?
What is rvalue?
List the features of oops in c++?
What is the use of endl in c++?
What is java and c++?
Define namespace in c++?
What is a modifier in c++?