//calculor.cpp
//divide two number and find their quotient and remainder
#include<iostream>
using namespace std;
void main()
{
long dividend,divisor;
char ch;
do
{
cout<<"\nEnter dividend:";cin>>dividend;
cout<<"\nEnter divisor:";cin>>divisor;
cout<<"\nQuotient is:"<<dividend/divisor;
cout<<"\nremainder is:"<<dividend%divisor;
cout<<"\n Do another?(y/n):";
cin>>ch;
}
while(ch!='n');
}
here out put:
Enter dividend:5
enter divisor:2
Quotient is:2
remainder is:1
Do another?(y/n)