For this Question: Given an integer N, your task is to find the smallest prime divisor of the given number.<b>User Task</b>
Since this is a functional problem, you don't have to worry about the input. You just have to complete the function <i>SmallestPrime()</i> which contains the given number N.

<b>Constraints:</b>
2 <= N <= 10<sup>4</sup>

<b>Note:</b> 
<i>But there is a catch here given user function has already code in it which may or may not be correct, now you need to figure out these and correct if it is required</i>Return the smallest prime factor of the given number.Sample Input:-
10

Sample Output:-
2

Sample Input:-
5

Sample Output:-
5, I have written this Solution Code: static int  SmallestPrime(int N)
	{
          
	 for(int i=2;i<=N;i++){
                  if(N%i==0){
                                      return i;}
            }
return N;

	}, In this Programming Language: Java, Now tell me if this Code is compilable or not?