Search
 
SCRIPT & CODE EXAMPLE
 

CPP

how to check is some number is divisible by 3 in c++

//Number
int number;
//Number you want to check if your number is devisible with
int devis;
if(number % devis == 0){
  //do something is it is devisible by num
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: sum of vector elements c++ 
Cpp :: c++ evaluate expression 
Cpp :: double to string c++ 
Cpp :: find in set of pairs using first value cpp 
Cpp :: include spaces while reading strings in cpp 
Cpp :: cpp bubble sort 
Cpp :: count word accurances in a string c++ 
Cpp :: how to round a double to 2 decimal places in c++ 
Cpp :: calculator c++ 
Cpp :: random number in a range c++ 
Cpp :: max of two elements c++ 
Cpp :: c++ sleep 
Cpp :: c++ type casting 
Cpp :: split string on character vector C++ 
Cpp :: iteraate through a vector 
Cpp :: number of lines in c++ files 
Cpp :: how to make copy constructor in c++ 
Cpp :: c++ max of array 
Cpp :: armstrong number in cpp 
Cpp :: c++ foreach 
Cpp :: matrix transpose in c++ 
Cpp :: casting c++ 
Cpp :: built in factorial function in c++ 
Cpp :: lutris 
Cpp :: sort vector in reverse order c++ 
Cpp :: loop through array c++ 
Cpp :: initialize string with length c++ 
Cpp :: inline function in c++ 
Cpp :: how to compile opencv c++ in ubuntu 
Cpp :: fizzbuzz c++ 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =