473,386 Members | 1,609 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Need help i am new in perl...

I have to write a programme. Whic is like this:

You are write a program whcih uses the quadratic equation to solve second-order polynominal. wchich is
a x**2 + b x + c =0

and use the quadratic equation, when given value for the coefficient a, b and c, to find the value of x for which the equation is true the quadratic equation is

-b +- sqrt (b**2 -4ac)
X = --------------------------------------------
2a
program should prompt for the value of cofficients a, b and c from the user and the output the solutions. The interaction with the user might look like this:

Input value for the cofficient a: 2
Input value for the cofficient b: 5
Input value for the cofficient c: 1

The possible value for x are :
-0.219223593595585
-2.28077640640442

please help me out
thankx in advance
mk
Feb 19 '08 #1
5 1264
nithinpes
410 Expert 256MB
Kindly provide the code that you have tried and tell where you are facing problems. Providing answers for Homework is against the policies of the forum.

Please go through Posting Guidelines
Feb 19 '08 #2
KevinADC
4,059 Expert 2GB
Kindly provide the code that you have tried and tell where you are facing problems. Providing answers for Homework is against the policies of the forum.

Please go through Posting Guidelines
This makes at least two forums this question is posted on. I expect the count to rise as I check other forums.
Feb 19 '08 #3
numberwhun
3,509 Expert Mod 2GB
Kindly provide the code that you have tried and tell where you are facing problems. Providing answers for Homework is against the policies of the forum.

Please go through Posting Guidelines
I fully agree! We cannot do your homework for you, but we can help you if you get stuck. You have to do the coding legwork though.

Regards,

Jeff
Feb 19 '08 #4
eWish
971 Expert 512MB
Sorry dude, I failed math... :)

--Kevin
Feb 19 '08 #5
KevinADC
4,059 Expert 2GB
Sorry dude, I failed math... :)

--Kevin
He's forum shopping for the answer, posting the same question on multi-forums (up to three now that I have seen). I recommend you delete this thread, this person does not want help, he wants the answer coded and ready to turn in for a grade.
Feb 19 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: MegaZone | last post by:
I'm having some issues with PHP DOMXML - in particular the get_elements_by_tagname method. Now, the PGP docs on this are, well, sparse, so maybe I'm just doing something stupid. I thought this...
9
by: Roy Smith | last post by:
I'm working on a prototype of a new application in Python. At some point, if this ever turns into a product, the powers that be will almost certainly demand that it be done in Perl. My job will...
2
by: Paul Porcelli | last post by:
Hi folks, I have a perl one-liner embedded in a ksh script. perl -pi.bak -e "s/val/otherval/" inputfile I'd like to check the return code to know if the substitution was successful. If I...
1
by: Spamtrap | last post by:
I only do occasional Perl programming and most things I write are short processes. I have something I'm working on that is scanning a text file with about 15 million lines and trying to extract...
7
by: Mike Kamermans | last post by:
I hope someone can help me, because what I'm going through at the moment trying to edit XML documents is enough to make me want to never edit XML again. I'm looking for an XML editor that has a...
6
by: prieditis | last post by:
I need some very basic advice. Let's suppose I need to do some mysql queries and updates to a database. I also need to dynamically update parts of a web page that the user is looking at based on...
20
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site...
2
by: MK | last post by:
Hello, I am new to XML and PERL and I have a few questions the answers to which I need to complete a project. All your time and effort would be highly appreciated. I have to make a small HTML page...
4
by: Freedolen | last post by:
Hi I found a website "http://www.gahooyoogle.com" which is a search engine and fetches result from both yahoo and Google. tried to develop a similar one but with more simpler and i...
1
by: vikjohn | last post by:
I have a new perl script sent to me which is a revision of the one I am currently running. The permissions are the same on each, the paths are correct but I am getting the infamous : The specified...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.