public class Solution {
public static void main(String[] args) {
int age = 0;
Solution sl = new Solution();
sl.solution(age);
System.out.println(sl.solution(age));
}//main
public int solution(int age) {
int answer = 0;
answer = 2022 - age;
return answer;
}
'Programmers > programmers Lv.0' 카테고리의 다른 글
[프로그래머스] 양꼬치 (1) | 2023.03.02 |
---|---|
[프로그래머스 자바] 분수의 덧셈 (0) | 2023.02.28 |
[프로그래머스] 피자 나눠 먹기 (1) (0) | 2023.02.24 |
[프로그래머스] 영어가 싫어요 (0) | 2023.02.24 |
[프로그래머스] 7의 개수 (0) | 2023.02.23 |