C++ Program to Compute Quotient and Remainder
#includeusing 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; }
Output
Enter dividend : 22 Enter divisor : 4 Quotient : 5 Remainder : 2
Happy Coding
Thanks for visiting my Blog.
Have any problem, feel free to contact us via Email : uoslondy@gmail.com
Have a good day!