Advertisement
noor017

Triangle

Jun 7th, 2015
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.27 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. int main()
  4. {
  5.     double A, B, C;
  6.     scanf("%lf %lf %lf", &A, &B, &C);
  7.  
  8.     if(A+B > C && A+C > B && B+C > A)
  9.     {
  10.         printf("Perimetro = %0.1lf", A+B+C);
  11.     }
  12.  
  13.     else
  14.     {
  15.          printf("Area = %0.1lf", ((A+B)/2)+C);
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement