+ 3
Why we can't write x=z it give error when we write x=z but when we write z=x its gives no error
2 Respostas
+ 3
If you wrote x = z, you would assign to the variable 'x' the value of 'z', but in your program there was no variable 'z' declared, thus it is unknown to the compiler.
The other way round you declare a variable 'z' and assign it the value of 'x' (here: 2), which was declared before and therefore known by the compiler.
In short: You cant work with variables you havent declared before.
+ 2
thx bro