title: how to print specific number of digits in c++?For example ,printing 8 digits totally(before+after decimal point combined)
body: <p>how to print specific number of digits in c++?For example ,printing 8 digits totally(before and after decimal point combined) 
  Edit: For further clarification, setprecision sets the digits when i have decimal digits to display.I want to display integer 30 also as 30.000000 ,in 8 digits.
  The setprecision command puts fixed no. of digits after decimal and i don't want that. 
  In short , I want an alternative of c command printf("%8d",N) in C++.</p>