Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- /* run this program using the console pauser or add your own getch, system("pause") or input loop */
- int main(int argc, char** argv) {
- float a,b,c;
- cout<<"Ingrese el lado a"<<endl;
- cin>>a;
- cout<<"\nIngrese el lado b"<<endl;
- cin>>b;
- cout<<"\nIngrese el lado c"<<endl;
- cin>>c;
- if ( a+b>c && a+c>b && c+b>a){
- if (a==b && a==c){
- cout<<"\nEs triangulo equilatero"<<endl;
- } else if ( a==b || a==c){
- cout<<"\nEs triangulo Isoceles"<<endl;
- }else if ( a!=b && a!=c){
- cout<<"\nEs triangulo escaleno"<<endl;
- }
- }else{
- cout<<"\No Existe un Triangulo con esas medidas"<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement