ramontricolor12

LISTA 02 - exercício 55

Jun 3rd, 2013
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.36 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main()
  5. {
  6.     float x, resul;
  7.  
  8.     printf("\nInforme o valor de x: ");
  9.     scanf("%f", &x);
  10.  
  11.     if ((pow(x,2) -16) <= 0)
  12.     {
  13.         printf("\nNao e possivel!!\n");
  14.         return -1;
  15.     }
  16.     else
  17.         resul = (5*x + 3)/ sqrt (pow(x,2) -16);
  18.  
  19.     printf("\nO resultado e: %f\n", resul);
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment