Please teach me how to do this question in C++ coding An integer number’s proper
ID: 3777796 • Letter: P
Question
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)
Explanation / Answer
#include using namespace std; int main() { int divisor, dividend, quotient, remainder; cout > dividend; cout > divisor; quotient = dividend / divisor; remainder = dividend % divisor; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.