You would get the quotient first and count the digits.
All fractions ever meant was simply division. 1/8 = 1 divided by 8. Perform this division by hand, without using remainders, and you'll see that the quotient of 1 and 8 is 0.125.
6
74.4035
54
2.78
A divisor is a number that divides another number, also known as the dividend, without leaving a remainder. The quotient, on the other hand, is the result of dividing the dividend by the divisor. In other words, the quotient is the answer to a division problem. The divisor and the quotient are related in that the divisor is used to divide the dividend and obtain the quotient.
3. The quotient of two numbers is the result of division. In this case, 21 is the dividend, or the number being divided, and 7 is divider, or the number doing the dividing.
All fractions ever meant was simply division. 1/8 = 1 divided by 8. Perform this division by hand, without using remainders, and you'll see that the quotient of 1 and 8 is 0.125.
int dividend,divisor,remainder; int division(int p,int q){ int quotient=1; /*if divisor and diviend are equal then quotient=1*/ if(p==q){ remainder=0; return 1; } /*if dividend is smaller than divisor then remainder=dividend*/ if(p<q){ remainder=p; return 0; } /*shift left till divisor > dividend*/ while(p>=q){ q<<=1; quotient<<=1; } /*shift right for one time so that divisor become smaller than dividend*/ q>>=1; quotient>>=1; /*again call division recurcively*/ quotient+=division(p-q,divisor); return quotient; } int main(){ cout<<"\nEnter dividend:"; cin>>dividend; cout<<"\nEnter divisor:"; cin>>divisor; cout<<"\nQuotient:"<<division(dividend,divisor); cout<<"\nRemainder:"<<remainder; //system("pause"); return 0; }
There is no general answer because either method works. And some people are more comfortable following one way while others prefer the other way.
6
74.4035
54
2.78
No, because a quotient requires two numbers. Given the two numbers it is quite easy to work out the number of digits in the quotient.
647.25
It is the amount of times 0.5 goes into 22.4, without the remainder. So the quotient is 44.