Curso-lenguaje-C/curso-juantxi/Ejercicios/0102calcularArea.c

18 lines
278 B
C
Raw Normal View History

2022-09-01 18:40:17 +02:00
#include<stdio.h>
#define PI 3.14
int main(){
2024-03-12 21:53:03 +01:00
2022-09-01 18:40:17 +02:00
float radio;
float area;
2024-03-12 21:53:03 +01:00
printf("\nIndica el radio de una circunferencia: ");
2022-09-01 18:40:17 +02:00
scanf("%f", &radio);
area=radio*radio*PI;
2024-03-12 21:53:03 +01:00
printf("\nEl area de la circunferencia de radio %.2f es %.3f\n", radio, area);
2022-09-01 18:40:17 +02:00
2024-03-12 21:53:03 +01:00
}