Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help with this little program
#5
(01-17-2012, 04:22 PM)AceInfinity Wrote: Either way your equations are wrong, remember that order of operation comes into play, so USE BRACKETS where ever applicable to make sure that certain numbers get calculated first over others:

This is wrong anyway:
Code:
s=(b*b)-1*4*a*c;

where does the -1 come in? and
-4ac != -1*4*a*c

that would do:
= -4
= -4a
= c(-4a)

Hmm, there I am wrong, C++ does not support MINUS sign with a VARIABLE, I had this in mind and put it with a number too, but that does not matter anything. The problem is with SQUARE ROOT of Negative number...


[url=http://myurl.pk/BLgzA][/url]
Reply


Messages In This Thread
Need help with this little program - by Clones - 01-17-2012, 03:22 AM
RE: Need help with this little program - by Clones - 01-18-2012, 08:46 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)