im new to C# and ive been trying to solve project euler question number 3 and got the following error: i understand i need to decler a new BigInt before i use it, but i just cant figure out the syntax. would love to get some help!
using System;
using System.Numerics;
namespace primes
{
class Question3
{
static void Main()
{
BigInteger Memash = 600851475143 ;
for(BigInteger i = 100 ; i <= Memash ; i++)
{
if(primechec(i))
{
Console.Write("this number is prime: " + i);
if(Memash % i == 0)
{
Console.Write(i);
}
}
}
}
public bool primechec(BigInteger Naor)
{
for(int j = 2 ; j <= Naor ; j++)
{
if(Naor % j == 0)
{
return false;
}
}
return true;
}
}
}