Ask your own question, for FREE!
Mathematics 13 Online
OpenStudy (unklerhaukus):

x = x + 1

OpenStudy (texaschic101):

hmm..if you subtract x from both sides, that eliminates the x....I am confused

OpenStudy (warriorz13):

Wouldn't that be impossible let's say x=2 well 1+2=3 so then its not right x=3...well 1+3=4 so it's not right

OpenStudy (texaschic101):

no solution ??

OpenStudy (warriorz13):

No solution it is impossible If you read my explanation you will see

OpenStudy (jadeishere):

there's no solution. x - x = 0 0 does not equal 1 so the answer is there is no answer

OpenStudy (warriorz13):

THANK YOU!

OpenStudy (unklerhaukus):

oh sorry, i thought this was the computer science section,

OpenStudy (warriorz13):

>:(

OpenStudy (luigi0210):

I was about to ask what kind of math this was xD I know you're definitely passed all of us in math.

OpenStudy (nincompoop):

I can solve this

OpenStudy (unklerhaukus):

computer science is strange notations

OpenStudy (nincompoop):

x = x + 1 is exactly x = x + 1 so for any value of x, add 1 to it

OpenStudy (jadeishere):

Nin. Still wouldn't work.

OpenStudy (nincompoop):

how does it not work?

OpenStudy (unklerhaukus):

x = 2 x = x + 1 x == 3

OpenStudy (shubhamsrg):

x=x+1 theoretically for x->inf

OpenStudy (luigi0210):

Oh, I see what you mean, nin.

OpenStudy (jadeishere):

(example) x = 2 2 = 2+1

OpenStudy (jadeishere):

okay i don't understand what you mean

OpenStudy (jadeishere):

does 2 = 3? that's how it doesn't work

OpenStudy (unklerhaukus):

2 != 3

OpenStudy (nincompoop):

hehehe

OpenStudy (nincompoop):

try it in C

hartnn (hartnn):

could have simply written x++ there would have been no confusion :P

OpenStudy (unklerhaukus):

hahahah

OpenStudy (nincompoop):

Python 2.7.5 (default, Aug 25 2013, 00:04:04) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> x = int(raw_input("Please enter an integer: ")) Please enter an integer: 45 >>> x = x+1 >>> print n >>> print x 46

OpenStudy (nincompoop):

I had to use Python because I couldn't load C in the shell

OpenStudy (nincompoop):

scratch print n LAUGHING OUT LOUD that will return as undeclared variable

OpenStudy (nincompoop):

hartnn (hartnn):

whats the question though ?

OpenStudy (unklerhaukus):

|dw:1398787663675:dw|

OpenStudy (nincompoop):

I don't have a question I clarified confusion.

OpenStudy (unklerhaukus):

OpenStudy (whpalmer4):

while Python does use "=" for both assignment and equality testing, some languages distinguish the two by using different symbols C uses = for assignment and == for equality testing, as does Mathematica APL uses "<-" to denote assignment "x <- x+1" SAIL uses "_" to denote assignment "x _ x + 1"

OpenStudy (nincompoop):

if you have a unix shell, try the code I used and enter a different integer, then try to display the value of x this happens in C, C# or C++ as well just with a different syntax

OpenStudy (unklerhaukus):

i also would have accepted x += 1

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!