SHARE
TWEET

jhon wick3

a guest Oct 15th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #include <math.h>
  4.  
  5. double hipotenusa(double cateto1,double cateto2){
  6.     double valor_hipotenusa;
  7.    
  8.     valor_hipotenusa =(cateto1 * cateto1) + (cateto2 * cateto2);
  9.    
  10.     return valor_hipotenusa;
  11. }
  12.  
  13. double resolve( double c1, double c2){
  14.     double c1,c2;
  15.     double resultado;
  16.  
  17.     printf("Digite o valor do primeiro cateto: \n");
  18.     scanf("%lf",&c1);
  19.  
  20.     printf("Digite o valor do segundo cateto: \n");
  21.     scanf("%lf",&c2);
  22.  
  23.     return (resultado = hipotenusa(c1,c2));
  24. }
  25.  
  26. int main (void ){
  27.     int resultado = lerDoTeclado (c1,c2);  
  28.     printf("O valor da hipotenusa é: \n %lf",sqrt(resultado));
  29.  
  30. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top