Hi guys, I'm having problem getting set precision to work. Basically it is supposed to output $1.00-$10.00 but I am getting $1-$10. Any help would be gladly appreciated
Well, you declared int i but setprecision() works for float point numbers. So, in the line 10 (float)i is used for this. Only here, for this cout, int i will be...float i.