本帖最后由 Sophia 于 2-5-2017 02:48 PM 编辑 7 A ^5 d8 @5 S s Z% {# U3 Y/ ]. }" u; i( g6 a* D) E) J& {1 a
We have a Very big which our datatypes does not provide.( l6 N. Q! i9 A9 r
We need to multiply such numbers, how to do? 6 B8 ^9 Z6 K3 R( b V8 R7 u* N% o" texample :" n/ u, }1 F" w& r8 g4 |- ^8 b
% Q+ O P; M( f# @4 e( [0 rNum1 = {1,2}, Num2 = {1,0} then ans would be {1,2,0} ! ]" B+ J4 u: T. ENum1 ={5,3,6,2,8,2,0,2,8}, num2 ={3,5,2,3,2,1,} q) o0 Y$ w, n6 t# `then ans would be the multiplication value of 5362882028 X 352321
Use arrays to store the numbers, then for multiplication you will need n no of arrays, where n is the no of digits of smaller number and one extra array to store carry ,
) E- U( [" _1 _ Then perform multiplication :)