fork download
  1. #include <iostream>
  2. #include <iomanip>
  3.  
  4. int main()
  5. {
  6. for(auto month : {"March", "April", "May"})
  7. {
  8. double v;
  9. std::cin >> v; //because I'm lazy
  10. std::cout
  11. << std::setw(6) << std::left
  12. << month
  13. << std::setw(25) << std::right << std::fixed << std::showpoint << std::setprecision(2)
  14. << v
  15. << std::endl;
  16. }
  17. }
  18.  
Success #stdin #stdout 0s 3232KB
stdin
500
1013
2050
stdout
March                    500.00
April                   1013.00
May                     2050.00