| Lexington High School Mathematics | Math Dept. Front Page | Student Links | Family Links |
| Introduction to C++, Kevin Kelly | Kelly Front Page | C++ Course Guide | C++ Assignments | C++ Info |
Write a function divisible that returns true if an integer is evenly divisible by another integer, and returns false otherwise.
For example, divisible(6,2) should return true because 6 divided by 2 divides evenly (has no remainder). On the other hand, divisible(7,2) should return false because 7 divided by 2 does not divide evenly (there is a remainder).
Also write a main program that tests the function. You may choose your own test values.