Posted by: khoi_k_khoi_k February 14, 2010
C++ adding fractions
Login in to Rate this Post:     0       ?        
your solution seems to be correct.

I have one suggestion

"i" can be declared as integer, but will not hold up to "100000000" number, it should be declared as long or long long. double is for floating point number

I am guessing that u got negative answer at first because you forgot to initialize the "sum" to zero. is that correct :D
Read Full Discussion Thread for this article