Created
June 15, 2021 05:18
-
-
Save Kevin-Gomez10/9872a7e029f0cf65fb5387ba96a96775 to your computer and use it in GitHub Desktop.
POO Act12 clase figura hipotenusa
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
#include <iostream> | |
#include<math.h> | |
using namespace std; | |
#include "joan.h" | |
void figura::cargar_datos(){ | |
cout<<"Ingrese valor de A "<<endl;cin>>A; | |
cout<<"Ingrese valor de B "<<endl;cin>>B; | |
}// fin de cargar datos | |
double figura::cuadrado(double x){ | |
int r=x*x; | |
return r; | |
}//fin de cuadrado | |
double hipotenuza::calcula_hipotenuza(){ | |
h=sqrt(cuadrado(A)+ cuadrado(B)); | |
return h; | |
}// fin de calcula hipotenuza |
Author
Kevin-Gomez10
commented
Jun 15, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment