Need help i am new in perl...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mulakerakha
    New Member
    • Feb 2008
    • 1

    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.2192235935955 85
    -2.2807764064044 2

    please help me out
    thankx in advance
    mk
  • nithinpes
    Recognized Expert Contributor
    • Dec 2007
    • 410

    #2
    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

    Comment

    • KevinADC
      Recognized Expert Specialist
      • Jan 2007
      • 4092

      #3
      Originally posted by nithinpes
      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.

      Comment

      • numberwhun
        Recognized Expert Moderator Specialist
        • May 2007
        • 3467

        #4
        Originally posted by nithinpes
        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

        Comment

        • eWish
          Recognized Expert Contributor
          • Jul 2007
          • 973

          #5
          Sorry dude, I failed math... :)

          --Kevin

          Comment

          • KevinADC
            Recognized Expert Specialist
            • Jan 2007
            • 4092

            #6
            Originally posted by eWish
            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.

            Comment

            Working...