Hi hary, when do you think that there can be problem? The sq is never made to store a value > 10^9 (for previous sq) +9*10^9 (for new sum) hence the sum never exceeds 10^10 which is under the range of int.
Correct me if i go wrong somewhere. On Thu, Apr 28, 2011 at 12:26 PM, hary rathor <[email protected]>wrote: > bro u r currect but what happen when result exceed greater then integer > range? > here sq variable is not bery large > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
