mcqs bucket

  • MCQs Bucket | Program Write a Program in C++ to Find Quotient and Remainder?

    mcqsbucket

      Best guide for exams of all nature, Competitive exams and Interviews

Write a Program in C++ to Find Quotient and Remainder?

	 
                                 		#include < iostream >  
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;
}