#include <stdio.h>
#include <math.h>
float pitagora(float cateto1, float cateto2) {
float q1, q2, ipotenusa;
q1 = pow(cateto1, 2);
q2 = pow(cateto2, 2);
ipotenusa = sqrt(q1+q2);
return ipotenusa;
}
void main() {
float lato1, lato2;
lato1 = 4.0;
lato2 = 3.0;
printf("ipotenusa = %.2f", pitagora(lato1, lato2));
}
To embed this project on your website, copy the following code and paste it into your website's HTML: