Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

bool function in c++

bool Divisible(int a, int b) {
    int remainder = a % b; // Calculate the remainder of a and b.

    if(remainder == 0) {
        return true; //If the remainder is 0, the numbers are divisible.
    } else {
        return false; // Otherwise, they aren't.
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #bool #function
ADD COMMENT
Topic
Name
1+6 =