Coding Test/프로그래머스

[프로그래머스/자바] 나이 출력

yurison 2023. 2. 22. 09:44

class Solution {
    public int solution(int age) {
        return 2023-age;
    }
}

class Solution {
    public int solution(int age) {
    	int year = 2022;
        return year-age+1;
    }
}