💻 나의 코드
using System;
public class Solution {
public int solution(int[] array, int n) {
int answer = 0;
for(int i = 0; i < array.Length; i++)
{
if(array[i] == n)
{
answer++;
}
}
return answer;
}
}
'프로그래머스 > Lv.0' 카테고리의 다른 글
[프로그래머스 C#] 점의 위치 구하기 (0) | 2023.07.19 |
---|---|
[프로그래머스 C#] 배열 원소의 길이 (0) | 2023.07.19 |
[프로그래머스 C#] 짝수 홀수 개수 (0) | 2023.07.18 |
[프로그래머스 C#] 양꼬치 (0) | 2023.07.17 |
[프로그래머스 C#] 두 수의 나눗셈 (0) | 2023.07.17 |