cout<<"Resultant Force vector in Newtons and Cartesian form: "<<fixed<<setprecision(.1)<<pointSum[0]<<"i "<<pointSum[1]<<"j "<<pointSum[2]<<"k"<<endl;
return 0;
I set the precision to .1.
And for example it displays:
Resultant Force vector in Newtons and Cartesian form: +322i -17j -1467k
I wanted my code to only display first three significant figures. Would I still need to use setprecision or something else?