Home > other >  C # gothic conjecture
C # gothic conjecture

Time:11-02

Class Program
{
The static void Main (string [] args)
{
For (int n=2; N & lt;=100; N +=2)
{
For (int a=1; A. & lt; N/2; A +=2)
{
Int b=n - a;
If (IsPrime (a)==true & amp; & IsPrime (b)==true & amp; & A!!!!=b)
{
Console. WriteLine (n + "=" + a + "+" + b);
//break;
}
}
}
}
The static bool IsPrime (int b)
{
For (int a=2; A. & lt; b; +)
{
If (b % a!=0)//why do you write the wrong results
{
return true;
}
}
return false;
}
}
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Class Program
{
The static void Main (string [] args)
{
For (int n=2; N & lt;=100; N +=2)
{
For (int a=1; A. & lt; N/2; A +=2)
{
Int b=n - a;
If (IsPrime (a)==true & amp; & IsPrime (b)==true & amp; & A!!!!=b)
{
Console. WriteLine (n + "=" + a + "+" + b);
//break;
}
}
}
}
The static bool IsPrime (int b)
{
For (int a=2; A. & lt; b; +)
{
If (a=b %=0)
{
return false;//so write the results to
}
}
return true;
}
}

What is the principle?
  • Related