CLASES DE TRIANGULOS


//CLASES DE TRIANGULOS SEGUN SUS LADOS
import java.util.Scanner;
public class triangulo {
    public static void main (String[]arg){
        Scanner t= new Scanner(System.in);
        int a, b , c;
        System.out.println("ingrese lado a");
        a=t.nextInt();
        System.out.println("ingrese lado b");
        b=t.nextInt();
        System.out.println("ingrese lado c");
        c=t.nextInt();
     
        if(a==b && a==c && b==c){
        System.out.println("equilatero");}
        else{
          if(a!=b && b!=c && a!=c)
        {System.out.println("escaleno");}
        else
        {System.out.println("isoseles");}
     
        }
        }
    }

No hay comentarios:

Publicar un comentario

 

Sample text

Sample Text

Sample Text

 
Blogger Templates