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
This is a discussion on floating and double number within the C++ Programming forums, part of the General Programming Boards category; You know how in c programming you can define up to how many decimal points you want by %.2f or ...
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)