Nathan Coulas

CCC '14 J1 - Triangle Times

ccc14j1 JAVA8 08 Dec, 2019 1.173s 3 points

Source Code

import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) {
      
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();
        int c = in.nextInt();

        if(a + b + c != 180){
            System.out.println("Error");
        }else if(a == b && c == b){
            System.out.println("Equilateral");
        }
        else if(a == b || a == c || c == b){
            System.out.println("Isosceles");
        }else if(a != b && c != b){
            System.out.println("Scalene");
        }
 
    }
  
    
}