[백준] 10101번 : 삼각형 외우기 - Java(자바)

강재원·2022년 9월 14일
0

[코딩테스트] Java

목록 보기
32/200



https://www.acmicpc.net/problem/10101

import java.util.*;
public class Main {
    public static void main(String args[]) {
        Scanner s=new Scanner(System.in);
        int a=s.nextInt();
        int b=s.nextInt();
        int c=s.nextInt();
        int sum=a+b+c;
        if(sum==180){
            if(a==60 && b==60 && c==60) System.out.print("Equilateral");
            else if(a==b || b==c || a==c) System.out.print("Isosceles");
            else System.out.print("Scalene");
        }
        else System.out.print("Error");
    }
}
profile
개념정리 & 문법 정리 & 알고리즘 공부

0개의 댓글