Posted by: billo February 13, 2010
C++ adding fractions
Login in to Rate this Post:     0       ?        
i got the solution, i think its correct

double sum, i;
    for (i = 1, sum = 0; i <= 100000000; i++);
    sum = sum +1/i;
    cout << "Sum is " << sum << endl;

Read Full Discussion Thread for this article