fork download
  1. #include <iostream>
  2. #include <iomanip>
  3.  
  4. // printf("\n %.2f Celsius = %.2f Fahrenheit", celsius, fahrenheit);
  5.  
  6. int main()
  7. {
  8. const float celsius = 10.555;
  9. const float fahrenheit = 50.999;
  10.  
  11. std::cout << '\n'
  12. << std::fixed
  13. << std::setprecision( 2 )
  14. << celsius << " Celsius = "
  15. << fahrenheit << " Fahrenheit";
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0s 4376KB
stdin
Standard input is empty
stdout
10.56 Celsius = 51.00 Fahrenheit