You know how in c programming you can define up to how many decimal points you want by %.2f or %.3f in printf......how can i do that with cout???
thanks
You know how in c programming you can define up to how many decimal points you want by %.2f or %.3f in printf......how can i do that with cout???
thanks
cout.setprecision(n);
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
you also have to #include <iomanip.h> then setprecision(number here)