Matthew L.

asked • 04/03/17

I need some help with variables.

So, I m in an online coding class and I have been stumped by this challenge.
Here are my starting variables:
 
 
var x = 5;
var y = 11;
var z = 4;
 
I need my output to be:
x = 2
y = 6
z = 8
 
There are some guidelines though:
- I am only allowed to add lines of code that re-assign values of variables provided.
- I am only allowed to use assignment (=) and arithmetic operators (+ - * /).
- I am NOT allowed to type or introduce any numbers.
 
*I would ve got this right away, but I am NOT allowed to assign a new variable. :/
 
Can someone please help?

1 Expert Answer

By:

Will R. answered • 04/03/17

Tutor
4.8 (55)

Exceptional All-Around Tutor

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.