![]() Squadratic formula in c++ - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Skype & Technology (/forumdisplay.php?fid=9) +---- Forum: Tech Talk (/forumdisplay.php?fid=17) +----- Thread: Squadratic formula in c++ (/showthread.php?tid=65080) Squadratic formula in c++ by somelauw on 08-18-2006 at 04:04 PM
I am a beginner c++ programmer and this is my first program. quote:but it shows discriminant=-6,9e-018 I thought 10*10-4*5*5=0? Here my code: code: RE: Squadratic formula in c++ by Adeptus on 08-19-2006 at 02:17 AM Using your code, cut-n-pasted: quote:Looks good to me. Your code is fine. I doubt there could be a problem with your input, given that typing 5, 10, 5 is easy enough. That leaves a problem with your compiler. So, what platform and compiler are you using? RE: Squadratic formula in c++ by somelauw on 08-19-2006 at 10:59 AM
I use "windows XP home edition"(no service pack) as platform and the program I use is "Dev-C++" RE: Squadratic formula in c++ by Adeptus on 08-19-2006 at 03:03 PM
I don't know why you are getting incorrect results. The reason I compiled your code was because I looked it over and couldn't find any problems -- and it works fine here, as expected. RE: Squadratic formula in c++ by somelauw on 08-20-2006 at 09:23 AM
Thank you for your efforts. Maybe there is a compiler bug. |