Please teach me how to compile this program correctly. I tried to do this myself, but it didn't work for some reason. It seemed that the professor forgot to write some steps... Feel free to add steps in order for this program to work correctly. #include using namespace std; double cube (double s) { return s*s*s; } int main () { cout<<"Enter the side length of a cube: "; double side; cin>>side; cout<<"Volume of cube with side: "; cout<<"Length"<<side<<"is"; cout<<cube<<side<<endl; return 0; }
Explanation / Answer
#include using namespace std; double cube (double s) { return s*s*s; } int main () { coutside; cout