Jump to content

Multivar equation help

Featured Replies

Can anyone solve or help me find solutions for:

x + z - y = (0 or 15)

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

17 minutes ago, 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?

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.zip

 

Edited by Sensei

  • Author
49 minutes ago, 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.zip

 

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

  • Author

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...
On ‎2‎/‎18‎/‎2018 at 4: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?

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.

,

 

Archived

This topic is now archived and is closed to further replies.

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.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.