프로그래밍
프로그래머스 C# 배열 안에 있는 수를 2배씩 하기(배열의 상수 곱셈)
노마드선샤인
2022. 12. 20. 15:46
728x90
using System;
public class Solution {
public int[] solution(int[] numbers) {
int[] answer = new int[numbers.Length];
for(int i=0;i<numbers.Length;i++)
answer[i] = numbers[i] * 2;
return answer;
}
}
728x90