Hi, ive been trying to get this code to work, but the calculations just doesnt work. it gives me something like 1de00067 something like that. I seriously dont see the error :/ Any help is appreciated.
P.S. is it something about: "Initializing the lenth and the width?" i dont remember how to do that, help with that is appreciated. Thanks :)
#include <iostream>
using namespace std;
float poolsize(float length, float width, float depth); //function for volume
void main ()
{
float length;
float width;
float depth;
float volume;
cout << "Insert the length: ";
cin >> length;
cout << "Insert the width: ";
cin >> width;
cout << "Insert the depth: ";
cin >> depth;
volume = poolsize(length, width, depth);
cout << "The volume of the pool is: "<< poolsize;
system("pause");
}
float poolsize(float length, float width, float depth)
{
return length*width*depth;
}