I was trying to code for a program to solve linear equation in one variable | Sololearn: Learn to code for FREE!

+4

I was trying to code for a program to solve linear equation in one variable

it is giving logical error now Pls tell me what wrong is there in the program logic https://code.sololearn.com/cx571HCx4Aqz/?ref=app

10/19/2018 9:16:15 AM

Preeti

9 Answers

New Answer

-1

its 5 + 3 = 10

+5

Ulisses Cruz Pls help with this what's the logical error in this https://code.sololearn.com/cx571HCx4Aqz/?ref=app

+3

Uni that's grt it's correct now can u just tell me which line u editted

+2

Uni it is giving error in ans like if I enter x-2=0 I should get 2 as ans but m getting 98.0

+2

Ok so I looked at your code and I made a few changes. I think it works if x is the first term and idk if not but at least it outputs 2.0 is you enter x-2=0 https://code.sololearn.com/cHT6tfHZ1h05/?ref=app

+2

Of course preetiparna mishra sorry I will add it in thé code as comments

+1

Why creating one when you can use THIS MONSTER? https://code.sololearn.com/cKNyLALF7SAD/?ref=app

0

I run your code and I got no error....

0

preetiparna mishra it's done 😆😆