Program to determine the number is prime or not, C/C++ Programming

Write a function to determine whether a number is prime: it will return true if the input is prime and false otherwise. Use it to see whether -7 is prime.

 

Posted Date: 3/29/2013 2:07:00 AM | Location : United States







Related Discussions:- Program to determine the number is prime or not, Assignment Help, Ask Question on Program to determine the number is prime or not, Get Answer, Expert's Help, Program to determine the number is prime or not Discussions

Write discussion on Program to determine the number is prime or not
Your posts are moderated
Related Questions

why oops

Destructors A destructor function gets implemented whenever an instance of the class to which it belongs goes out of existence. The primary usage of a destructor function is

A: No. (Excluding if you have an old compiler, you might have to force the new operator to throw an exception if it runs out of memory.) This turns out to be a real pain to alwa

Question : (a) (i) What is a structure member in C? What is the relationship between a structure member and the structure? (ii) How can structure variables be declared in C?

An anagram is a type of word play, the result of rearranging the letters of a word or phrase to produce a new word or phrase. For example the anagram of tea is tea, tae, eat, eta,

Debug the following program to calculate N! #include using namespace std; main() {             int N, factorial=1;             cout             cin >> N;

Explain the Loop Statements in Computer Programming? 1. C gives you a choice of three kinds of loop, while, do while and for. 2. The while loop remain repeating an action until

A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''a''-''z'') and the asci

Write a program to print a digital clock which displays the time for 2 hours .