HugeInt HugeInt::operator/( const HugeInt &op2 )const { HugeInt temp; for( inti=
ID: 3617906 • Letter: H
Question
HugeInt HugeInt::operator/( const HugeInt &op2 )const
{
HugeInt temp;
for( inti=29;i>=0;i-- )
{
if( integer[i]>op2.integer[i])
{
temp.integer[i]= integer[i] /op2.integer[i];
temp.integer[i]%=10;
}
else
;
}
return temp;
Explanation / Answer
please rate - thanks HugeInt HugeInt::operator*( const HugeInt &op2 ) const { HugeInt temp; int i,j,k,tmp; for(i=0; i=1;i--) { k=i; for (j=29; j>=1;j--) {tmp =integer[ j ] * op2.integer[i]; temp.integer[k] =temp.integer[k]+tmp; temp.integer[k-1] =temp.integer[k-1]+temp.integer[k]/10; temp.integer[k] %=10; k--; if(k==0) j=0; } } return temp; }Related 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.