[프로그래머스 | C# | Lv.0] 정수찾기

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