Hello all,

As my name indicates, I am a new programmer. I was doing a program which calculates the roots of a quadratic equation but unfortunately there seems to be something wrong as it ignores my if statements!


Please take a look at my code and I'd appreciate your help

Recommended Answers

All 3 Replies

else if ( delta == 0 ) // compare, don't assign!
else if ( delta == 0 ) // compare, don't assign!

Yeah, thats a common mistake (i think we all made that one when we were starting out) :)

oh-uh that totally slipped off my mind .. Thanks a lot .. it works now! :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.