HugeInt HugeInt::operator*( const HugeInt &op2 )const { HugeInt temp,result; int
ID: 3617912 • Letter: H
Question
HugeInt HugeInt::operator*( const HugeInt &op2 )const
{
HugeInt temp,result;
int upMul=0;
for( intj=29;j>=0;j-- )
{
for(inti=29,a=j;i>=0;i--,a--)
{
temp.integer[a]= ((integer[i] *op2.integer[j])%10) + upMul;
upMul=((integer[i]*op2.integer[j])/10);
}
result=result+temp;
}
return result;