fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // Hardcoded side length of the cube
  6. double side = 5.0; // You can change this number to any value
  7. double volume;
  8.  
  9. // Calculate the volume
  10. volume = side * side * side;
  11.  
  12. // Display the result
  13. cout << "The volume of the cube with side " << side << " is: " << volume << endl;
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
The volume of the cube with side 5 is: 125