int m,n;
m = 98765;
n = 100000;
for (int i = m; i > 0; i--)
{
for (int j = m; j > 0; j--)
{
for (int b = m; b > 0; b--)
{
Console.WriteLine(i + " " + j + " " + b);
if (i + j + b == n)
{
Console.WriteLine(somas++);
/* As linhas abaixo são para observar como decorre o programa */
Console.WriteLine(i + " " + j + " " + b);//
}
}
}
}
However, for the specified values of N and M, the project took SO MUCH time to give the result, there is some way, to simplify it, some theorem, or something, something that would make it go faster. Thanks