Skip to content

Instantly share code, notes, and snippets.

@Kevin-Gomez10
Created June 15, 2021 05:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kevin-Gomez10/9872a7e029f0cf65fb5387ba96a96775 to your computer and use it in GitHub Desktop.
Save Kevin-Gomez10/9872a7e029f0cf65fb5387ba96a96775 to your computer and use it in GitHub Desktop.
POO Act12 clase figura hipotenusa
#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
@Kevin-Gomez10
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment