fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. float pi;
  7. double d_pi;
  8. scanf("%f",&pi);
  9. scanf("%1f",&d_pi);
  10. printf("pi=%.2f\n",pi);
  11. printf("d_pi=%.7f\n",d_pi);
  12. return 0;
  13. }
Success #stdin #stdout 0s 5320KB
stdin
3.1415
3.1415926
stdout
pi=3.14
d_pi=0.0000000