코딩테스트/[C#] 프로그래머스
[프로그래머스 | C# | Lv.0] 정수찾기
냠냠쿠
2023. 8. 28. 19:23
728x90
https://school.programmers.co.kr/learn/courses/30/lessons/181840
📝 나의 풀이
using System;
public class Solution {
public int solution(int[] num_list, int n) {
int answer = 0;
for(int i=0; i<num_list.Length; i++){
if(num_list[i]==n){
answer=1;
break;
}
}
return answer;
}
}
728x90