Hello there. Can anyone tell me how to count the setw and setprecision without using compiler. An explanation and way to know how to count it much appreciated. :D
The number used in setprecision(5) is the number of places to the right of the decimal point. This is your choice.
The number used in setw(8) is also your choice depending on what you want to do. I have not thought of using a variable for "setw", but I do not see why it could not be done. Sometimes you just make it wide enough to work or count the number of characters in the longest line that will print and work from there.