```
Hi all,here is the task Write a program y = PrimeCheck (n) that inputs an integer n > 1, and outputs an integer y
that is 1 if n is a prime number and 0 if it is not. The method used should use a brute force
check to see whether n has any positive integer factor k, checking all values of k (if
necessary) up to floor(√n).
namespace IntPrime
{
class Program
{
static void Main(string[] args)
{
int y;
Console.WriteLine("Enter number to check whether it is Prime Number or Not:");
y = int.Parse(Console.ReadLine());
Program pr = new Program();
if (pr.PrimeCheck(y))
{
Console.WriteLine("Is a Prime Number");
}
else
{
Console.WriteLine("It is Not a Prime Number");
}
Console.ReadLine();
}
// Find given number is Prime or Not
private bool PrimeCheck(int n)
{
int c;
for (c = 2; c <= (n / 2); c++)
{
if (n % c == 0)
{
return false;
}
}
return true;
}
}
}
How to improve and implement floor function?
```