Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

need help in c programming

Status
Not open for further replies.

Mostafa

Newbie level 4
Newbie level 4
Joined
Nov 23, 2003
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
69
hi all
i need to know if we can write a c program that can read the coefficients a, b,c and d of the equation: ax^3+bx^2+cx+d=0
and by considering all the cases...
waiting the answer ...and thanks all
Mostafa
 

Its a very easy program. If you know c or basic you can write this program very easy.
 

Vicent Yang


have you a code source in basic for that,if yes can you upload it ?
 

You can genetic algorithms to solve this, but I think its too hard for a newbie.
 

why not use perl
 

hi Vicent Yang
i need from you to write the program to me but in c language....and plz let it clear
and plz dont write two words and tell me this is the program....i need it complete....
and thanks so much
Mostafa
 

Hi,

Do you need c program to solve this equation ?

SphinX
 

yes i need a c program to solve this equation
thanks
Mostafa
 

Mostafa this is really funny you are asking for help in C programming and after a few questions asked by some members you finally want someone to write a program for you ...

Why did you not ask in the title of your post that you want somebody to write a C program for you??

best regards
 

Question though may seem easy to be solved by machine. but answer is not trivial . you need to consider all possible combination of a,b,c and d to satisfy the equation.
Did you have any constraint of these variable i.e upper and lower bound.
 

First try to find a simplest mathematical experesion for this
 

i know how to solve it manually by matrix . and also there is cardan's method to solve it.,..but it is hard to me as a beginner to know how to do program for this....
thanks
 

Here's a c program. I got the algorithm from a website. I'm not familier with the matrix method, if you can explain it, then I may try it for you.

happy_99
 

ok thanks i have got it, and there is no need to matrix
 

i think that thinking is better than copying. u are paying money in your university for learning and not for copying.
 

nice advice hassnan
but for your own informations, i am not copying i was thinking about it, and i didnt found a solution and when i knew the solution i will save it in my mind and that's a kind of good learning
thanks
 

do you have any numerical method knowledge? if not, then try to seek for some numerical method reference to solve it. in numerical methods, u just need to initiate a guess value to start iterating to your solution (just as wat most mathematic software like Mathcad does). hope may help u! MErry Xmas
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top