Advertisement
fellpz

Lados triangulos (if)

Mar 22nd, 2017
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <math.h>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     int a, b, c;
  10.     cout<<"Informe tres Numeros Inteiros: \n";
  11.     cin>> a>>b>>c;
  12.  
  13.     if (a > b+c || b > a+c || c > a+b){
  14.         return 0;
  15.     }
  16.         if (a == b && a == c && b == c){
  17.             cout<<"O triangulo eh equilatero";
  18.         }else{
  19.                 if (a == b || a == c || b == c){
  20.                     cout<<"O triangulo eh isoceles";
  21.                 }else{
  22.                         cout<<"O triangulo eh escaleno";
  23.                 }
  24.  
  25.         }
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement