fork download
  1. #include <cstdio>
  2. #include <iostream>
  3. #include <iomanip>
  4.  
  5. using namespace std;
  6.  
  7. int main() {
  8. long double a = 10 / 3.0;
  9. cout << fixed << setprecision(15) << a <<std::endl;
  10. printf("%.15Lf\n", a);
  11. }
Success #stdin #stdout 0s 5568KB
stdin
Standard input is empty
stdout
3.333333333333333
3.333333333333333