}
Result=1.33333
1.86667
2
correct result=1.33333
1.46667
1.52381
this seems only to be precise with n=1 only.
The condition is I cannot use setprecision too
I think it should be like this
#include <iostream>
int main()
{
int n = 5;
for ( int i = 1; i <= n; ++i )
{
const auto im = i-1;
const auto lhs = 1 + im / (2.0 * im + 1);
const auto rhs = 1 + i / (2.0 * i - 1);
std::cout << lhs << "*" << rhs << " \t= " << lhs * rhs << '\n';
}
}