Search
 
SCRIPT & CODE EXAMPLE
 

CPP

isprime c++

bool isprime(int n)
{
    if(n<=1)
        return false;
    for (int i = 2; i <= sqrt(n); i++)
        if (n % i == 0)
            return false;
  
    return true;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: c++ inline 
Cpp :: flutter margins 
Cpp :: c++ alphabet array 
Cpp :: c++ vector print 
Cpp :: conditional cout in c++ 
Cpp :: c++ how to loop through a vector but not the last element 
Cpp :: iterator on std::tuple 
Cpp :: how to iterate through a map in c++ 
Cpp :: modify file cpp 
Cpp :: c++ flush stdin 
Cpp :: leap year c++ 
Cpp :: c++ vector pop first element 
Cpp :: priority queue ordered by second element 
Cpp :: c++ pause 
Cpp :: how to iterate in string in c++ 
Cpp :: qimage transformed 
Cpp :: gmod hitman job code 
Cpp :: cannot open include file unreal 
Cpp :: perulangan c++ 
Cpp :: how to specify how many decimal to print out with std::cout 
Cpp :: calculate how many liters would be needed 
Cpp :: qstring get if empty 
Cpp :: casting pointer (int to char*) in c++ 
Cpp :: reading in lines from a file to a vector c++ 
Cpp :: using find in vector c++ 
Cpp :: priority queue c++ type of pairs 
Cpp :: convert string into integer in c++ 
Cpp :: sort function from bigest to smallest c++ 
Cpp :: how to run a c++ file from terminal linux 
Cpp :: unordered_map header file c++ 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =