fork download
  1. #include <iostream>
  2. #include<cmath>
  3. using namespace std; // consider removing this line in serious projects
  4. int main() {
  5. cout<<"The C++14 Volume Of A Sphere Container."<<endl;
  6. int radi = 12;
  7. float pi = 3.14;
  8. float multi = (1.3331);
  9. float multi2 = (multi * pi);
  10. float volume = (radi) * (radi) * (radi);
  11. double volume2 = (multi2) * (volume);
  12. double numx = volume2;
  13. double Roundednum = std::round(numx);
  14. cout<<"RADI "<<radi<<" PI "<<pi<<endl;
  15. std::cout<<" Volume2 "<<Roundednum<<std::endl;
  16. return 0;
  17. }
Success #stdin #stdout 0s 5288KB
stdin
1
2
10
42
11
stdout
The C++14 Volume Of A Sphere Container.
RADI 12 PI 3.14
 Volume2 7233