-
-
Save parzibyte/07f89c9cd5824e7dae4d1839907f1b9e 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
/* | |
https://parzibyte.me/blog | |
*/ | |
#include <stdio.h> | |
#include <math.h> | |
double calcularVolumen(double radio, double altura) | |
{ | |
return (M_PI * pow(radio, 2) * altura) / 3; | |
} | |
int main() | |
{ | |
double radio, altura; | |
printf("Ingresa el radio: "); | |
scanf("%lf", &radio); | |
printf("Ingresa la altura: "); | |
scanf("%lf", &altura); | |
double volumen = calcularVolumen(radio, altura); | |
printf("El volumen del cono es %lf", volumen); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment