[algorithm] 정수 부분

인철·2024년 2월 25일
0

algorithm

목록 보기
72/91
post-thumbnail

실수 flo가 매개 변수로 주어질 때, flo의 정수 부분을 return하도록 solution 함수를 완성해주세요.

class Solution {
    public int solution(double flo) {
        int answer = 0;
        answer = (int)flo;
        return answer;
    }
}
// 형변환 문제
profile
같은글이있어도양해부탁드려요(킁킁)

0개의 댓글