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