make size of both array by adding '0' in front of smaller array
then
int carry=0;
for(i=array.size();i>=0;i--)
{
sum[i]=carry+arrayA[i]+arrayB[i];
carry=sum[i]/10;
sum[i]=sum[i]%10;
}
then reverse and print sum
On Tue, Jun 26, 2012 at 3:40 PM, Ashish Goel <ashg...@gmail.com> wrote:

>
> Best Regards
> Ashish Goel
> "Think positive and find fuel in failure"
> +919985813081
> +919966006652
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Thanks & Regards
Amritpal singh

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to