fork download
  1. #include <iostream>
  2. #include <math.h>
  3.  
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. double pi = M_PI;
  10. int pre = 0;
  11.  
  12. cin >> pre;
  13.  
  14. cout.precision(pre);
  15. cout << fixed << pi;
  16. return 0;
  17. }
Success #stdin #stdout 0s 16064KB
stdin
2
stdout
3.14