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
Name the debugging methods that are used to solve problems?
In int main(int argc, char *argv[]) what is argv[0] a) The first argument passed into the program b) The program name c) You can't define main like that
Difference between declaration and definition of a variable.
What is buffering in c++?
Difference between inline functions and macros?
Which ide is best for c++?
How the programmer of a class should decide whether to declare member function or a friend function?
What is difference between c++ 11 and c++ 14?
What is iterator in c++?
How long will it take to learn programming?
How do you establish a has-a relationship?
Const char *p , char const *p What is the difference between the above two?
Can a constructor return a value?
Explain how functions are classified in C++ ?
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?