Jump to content

Recommended Posts

Posted (edited)
  On 2/18/2018 at 10:45 PM, Endy0816 said:

Can anyone solve or help me find solutions for:

x + z - y = (0 or 15)

with x, y, and z ranging between 0 - 15?

Expand  

Why not write C/C++ program?

#include <stdio.h>

int main( void )
{
	int counter = 1;
	for( int x = 0; x <= 15; x++ )
	{
		for( int y = 0; y <= 15; y++ )
		{
			for( int z = 0; z <= 15; z++ )
			{
				int result = x + z - y;
				if( ( result == 0 ) || ( result == 15 ) )
				{
					printf( "%d. X=%d Y=%d Z=%d\n", counter, x, y, z );
					counter++;
				}
			}
		}
	}
	return( 0 );
}

                                   

 

It generated 272 results, check results.txt in Release folder.

MultivarEquationHelp.zipFetching info...

 

Edited by Sensei
Posted (edited)
  On 2/18/2018 at 11:02 PM, Sensei said:

Why not write C/C++ program?

#include <stdio.h>

int main( void )
{
	int counter = 1;
	for( int x = 0; x <= 15; x++ )
	{
		for( int y = 0; y <= 15; y++ )
		{
			for( int z = 0; z <= 15; z++ )
			{
				int result = x + z - y;
				if( ( result == 0 ) || ( result == 15 ) )
				{
					printf( "%d. X=%d Y=%d Z=%d\n", counter, x, y, z );
					counter++;
				}
			}
		}
	}
	return( 0 );
}

                                   

 

It generated 272 results, check results.txt in Release folder.

MultivarEquationHelp.zipFetching info...

 

Expand  

Thank you. Seemed relatively simple at first. I was able to find a number of solutions myself, but the inner positions where no coordinate is zero or 15 were giving me a headache.

 

 

Edited by Endy0816
Posted
  On 2/18/2018 at 11:02 PM, Sensei said:

 

It generated 272 results, check results.txt in Release folder.

Expand  

272 integer results... do x, y, and z have to be integers? The original problem statement did not state that.

Posted

Yes, only needed the integers. :)

Somewhat embarrassed to say its for Minecraft. The normal order of events can alter at these particular coordinates. They repeat nigh infinitely across the world too, so should be extremely  useful.

  • 2 weeks later...
Posted
  On 2/18/2018 at 10:45 PM, Endy0816 said:

Can anyone solve or help me find solutions for:

x + z - y = (0 or 15)

with x, y, and z ranging between 0 - 15?

Expand  

I assume x, y, and z must be integers.

  First x+ z- y= 0.

If x= 0 then z-  y= 0 so z= y.

(0, 0, 0), (0, 1, 1), (0, 2, 2), ..., (0, 15, 15)

If x= 1 then z- y= -1 so z= y- 1

(1, 1, 0), (1, 2, 1), (1, 3, 2), ..., (1, 15, 14)

If x= 2 then z- y= 2 so z= y- 2

(2, 2, 0), (2, 3, 1), (2,  4, 2), ...., (2, 14, 12)

continue.

,

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.