1. Algebraic statement

Hi all,

I'm learning programming at the moment but my maths has never been great. They often use statements but they keep using one which I cannot get my head around which could for examlpe be:

x=3
x=x*17

What i don't understand is if you sub in 3 for x in the 2nd statement then the statement would read:

3=3*17

How is that possible that 3 can be equal to a number other than 3? It doesn't make sense to me at all???

Really appreciate any help.

Thanks

2. Hi

In that case what they are stating is the following:-

Take the value in the variable called X, then multiply by 17, and store the result back into the same variable (x). So to start with x=3, when the statement has finished then x will equal 51.

Cheers!

3. Originally Posted by Yetirat
Hi all,

I'm learning programming at the moment but my maths has never been great. They often use statements but they keep using one which I cannot get my head around which could for examlpe be:

x=3
x=x*17

What i don't understand is if you sub in 3 for x in the 2nd statement then the statement would read:

3=3*17

How is that possible that 3 can be equal to a number other than 3? It doesn't make sense to me at all???

Really appreciate any help.

Thanks
This is programming not mathematics. Here "=" is the assignment operator not an equality sign. Other languages will use ":=" or even "<-" to indicate that this is not an equation but an assignment.

CB

4. Thanks

I understand now.