https://www.codetree.ai/training-field/search/problems/functions-that-perform-certain-operations?&utm_source=clipboard&utm_medium=text
해당 문제에 따라서 코드를 짜면 쉽게 풀 수 있는 문제이다.
#include <iostream> using namespace std; int main() { int n; for(int i = 0; i < 3; i++) { cin >> n; if(n % 2 == 0) cout << n / 2 << " "; else cout << (n * 3) - 20 << " "; } return 0; }