Floating Exception (core dumped)

I am a student and have a relatively straight forward program for calculating sales totals, tax discounts, and another discount.

I compile without any errors but after I enter the tax rate, discount rate and discount qty I get the error:  Floating Exceptin (core dumped).  Is there a simple solution to this that I am unaware of?

Thank you
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Floating point exceptions typically occur when you attempt to divide by 0.
Just before you perform a floating point division operation, print out the divisor and dividend - make sure they are the values you expect.   You could also run the program from the debugger.  When the floating point exception occurs, the debugger will halt the program at the point of failure.  You can then examine the contents of variables to make sure they have the expected values.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.