나이 출력

화낼거양's avatar
Nov 14, 2024
나이 출력
Contents
문제정답
 
school.programmers.co.kr
 

문제

 
notion image
 
기본적으로 주어진 코드 :
#include <stdio.h> #include <stdbool.h> #include <stdlib.h> int solution(int age) { int answer = 0; return answer; }

정답

 
#include <stdio.h> #include <stdbool.h> #include <stdlib.h> int solution(int age) { int answer = 2022 - age + 1; return answer; }
 
Share article

moohyun