Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <math.h>
  2. #include <iomanip>
  3. //#include <cstdio>
  4. //#include <cmath>
  5.  
  6.  
  7.  
  8. using namespace std;
  9.  
  10. int main() {
  11. double r,p;
  12. cout << "Hello, World!" << endl;
  13. cout <<"podaj promien kuli"<<endl;
  14. cin >>r;
  15.  
  16. p = (4/3)*pow(r,3)*M_PI;
  17. //cout<<setprecision(2)<<p<<endl;
  18. printf ("%.2f",p);
  19.  
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement