title: How can i change printf("%.2f") in C++
body: <p>How can i change <code>printf("%.2f")</code> in C++ so that it will also display upto two decimals 
  Using cout </p>
  
  <p>Also for this to change in c++ to have blank space just like in c 
  <code>printf("-6c%14d%20.2f",'A',val1,val2);</code>
  I have declared val1,val2 in double</p>