Please teach me how to do this question in C coding An integ

Please teach me how to do this question in C++ coding

An integer number’s proper divisor is any positive integer that divides the number without remainder and is less than the number. Neither zero nor any negative number is a proper divisor. Write a function that returns true if its second parameter is a proper divisor of its first parameter.

The function’s prototype is

bool properDivisor(int number, int candidate)

Solution

#include using namespace std; int main() { int divisor, dividend, quotient, remainder; cout << \"Enter dividend: \"; cin >> dividend; cout << \"Enter divisor: \"; cin >> divisor; quotient = dividend / divisor; remainder = dividend % divisor; cout << \"Quotient = \" << quotient << endl; cout << \"Remainder = \" << remainder; return 0; }
Please teach me how to do this question in C++ coding An integer number’s proper divisor is any positive integer that divides the number without remainder and i

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site