Created
July 29, 2019 22:35
-
-
Save parzibyte/1f180f2371d161773652963c3ea41326 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
double volumenDeEsfera(double radio) { | |
/* | |
1: Elevar radio al cubo y eso multiplicarlo por PI | |
M_PI * pow(radio, 3); | |
2: Al resultado anterior lo multiplicamos por 4 | |
(4 * (M_PI * pow(radio, 3))) | |
3: Al resultado anterior lo dividimos entre 3 | |
(4 * (M_PI * pow(radio, 3))) / 3 | |
*/ | |
return (4 * (M_PI * pow(radio, 3))) / 3; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment