I am new to C++ programming and I am trying to understand this.
I am working on a program that is supposed to use the isosceles tringle and the Pythagorean Theorem. I am stuck on is the forumla for both. In the formulas they have second to the power of the base for the Volume and a second to the power of height.
My question: How would I be able to input this to C++ programming?
example: volume=A(sq)*h/3
my other question: why would this be /3 if the formula is really this?:
In the formulas they have second to the power of the base for the Volume and a second to the power of height.
What?
If this means base to power of 2 (base^2) then use: pow(base, exponential). There are a lot of overloading of this but double base, double exponential should cover you.
I didn't get what exactly you are asking so I may be wrong. In this article you can find square root (sqrt()) also although you can implement it with pow as well.
@ResidentBiscuit: float is fine depending on your requirements. If you're going to calculate a volume and then output the answer to 2 decimal places, why would you use a double? That's like using for (longlong i=0; i<2; i++)