Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- #define PI 3.14
- int main()
- {
- int catetoUno;
- int catetoDos;
- int hipotenusa;
- int radio;
- int areaCirculo;
- //esto no se ejecuta
- printf("ingresa un catetoUno \n");
- fflush(stdin);
- scanf("%d",&catetoUno);
- printf("ingresa catetoDos \n");
- //limpiar el buffer
- fflush(stdin);
- scanf("%d",&catetoDos);
- hipotenusa = sqrt( pow(catetoUno,2)+pow(catetoDos,2) );
- printf("la hipo es %d\n",hipotenusa);
- printf("ingresa radio \n");
- //limpiar el buffer
- fflush(stdin);
- scanf("%d",&radio);
- areaCirculo = PI * radio * radio;
- printf("el areaCirculo es %d\n",areaCirculo);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement