/* * @author: Jean Remi Lanteigne * @date: 19:51 3-2-2007 */ #include using namespace std; bool multiple(int one, int two); int main(int argc, char *argv[]) { int n1, n2; cout << "Determine if a number is a multiple of another. \nEnter a number: "; cin >> n1; cout << "Enter a second number: "; cin >> n2; if(multiple(n1, n2)) { cout << n1 << " is a multiple of " << n2; } else { cout << n1 << " is not a multiple of " << n2; } cout << "\nInput anything to end the program..."; char anything[2]; cin.getline(anything, 1) >> anything; return 0; } bool multiple(int one, int two) { if((one % two) == 0) { return true; } else { return false; } }