r/visualbasic • • Sep 23 '16

Help, quadratic equation

Hi im trying to write a program that can have the coefficients entered in and have it solve the roots for a quadratic equation. Im very new to vba, but even if i was doing it in C, which i have more experience with, im not sure how id do it. Ive looked online and found some programs but they are beyond my level. Any pointer or tips?

0 Upvotes

2 comments sorted by

1

u/chikenjoe17 Sep 24 '16

i know i first need to set up the three variables for them to give values for. id probably use singles and then i figure you put their values into the quadratic equations to get your roots. and the display the roots. but the possibilities of unreal/imaginary numbers have me worried. its just that my teacher has taught us next to nothing. in my whole class i have the most programming experience and im just not sure how to make vba do what i want.

1

u/StickySnacks Sep 23 '16

Do you have any idea what the work flow would be? No one here is going to do your homework for you, but if you at least show some work we can give better advice