Represent number N (N>1) as N = x + y, where x * y is the maximum possible value My problem is the following: I have to find such x and y (x+y=N) where x * y is the maximum possible value.

I have written an algorithm (which I think works well) and I am looking for more efficient and faster way to solve this problem.

This is my algorithm:

static void Find(int N)
{
    int multiplication = 1;
    int maxMultiplication = 1;
    int desiredNumber = 1;

    for (int i = 1; i &lt;= N / 2; i++)
    {
        multiplication = i * (N - i);
        if(multiplication &gt; maxMultiplication)
        {
            maxMultiplication = multiplication;
            desiredNumber = i;
        }
    }

    Console.WriteLine("Desired presentation of number N is --&gt; N = {0} + {1}",
        desiredNumber, N - desiredNumber);
}
$$\frac{\text{d}}{\text{d}x} x(N-x) = N - 2x$$
At a maximum, \$\frac{\text{d}f}{\text{d}x} = 0\$, so the maximum occurs when \$x = \frac{N}{2}\$. (Left as an exercise: show that it's a maximum and not a minimum).

Therefore you can skip the loop: desiredNumber = N / 2; is all you need. Note that if N is odd this gives the pair \$\left\lfloor \frac{N}{2} \right\rfloor, \left\lceil \frac{N}{2} \right\rceil\$, which is the correct solution in integers.