Assuming that we have an online coding website which restricts the number of variables in your code to 2 and you can do only 1 math calculation per line.(+,*,/,-, ,.......).
If we need to make a program like x+y=? we can use 2 variables only to make the code .
x = x + y, (Where x is your final answer and x,y are the variables).
A problem like xy + 2x=? will be .
y = x y.
x = 2 x.
x = x + y, ( x is your answer).
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The first one y 2 x y 2 + y :
It can also be written as y 2 y ( x y + 1 ) so :
x = x ∗ y
x = x + 1
x = x ∗ y
y = y ∗ y
x = x / y , (There is another solution try to find it.)
The second one 3 x y + 2 x 3 :
Tt can also be written as x ( 3 y + 2 x 2 ) so :
y = y ∗ 3
x = x ∗ x
x = x ∗ 2
y = x + y
x = x / 2
x = x
x = x ∗ y
The third one x + y 5 x 2 + 5 x y :
It can also be written as x + y 5 x ( x + y ) = 5 x so :
x = x ∗ 5
The fourth one x + y 5 x 2 + 3 x y :
Here comes the trick x + y 5 x 2 + 3 x y = x + y 2 x 2 + 3 x 2 + 3 x y = x + y 2 x 2 + 3 x ( x + y ) = x + y 2 x 2 + 3 x :
y = x + y
x = x ∗ x
x = x ∗ 2
y = x / y
x = x / 2
x = x
x = x ∗ 3
y = y + x
thanks for reading ;)