0

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;
}
2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by Aghtar
0

omg. cant believe that. i guess final weeks are getting the best out of me. thanks bro. really appreciate it.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.