Results 1 to 5 of 5

Thread: i want formula for this calculation

  1. #1
    Junior Member
    Join Date
    Jan 04
    Location
    India
    Posts
    27

    i want formula for this calculation

    Hello,

    I have been using vb.net

    I have this calculation

    2.0 = 90%

    3.75 = 80%

    Now, suppose i would have value something line 2.85

    So, i need exact percentage for this value.Moreover, result must fall between 90%-80%.

    How can i get this ?

    Help me out,

    Regards,
    ASIF
    bhuraAM

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 05
    Location
    Sydney, Australia
    Posts
    80,816

    Re: i want formula for this calculation

    That question has nothing whatsoever to do with ASP.NET. It doesn't even really have anything to do with programming. That's a basic maths question. This is not a maths forum. You need to work out yours maths BEFORE you write any code. The code is not the solution but rather an implementation of the solution. You need to pick up a pen and paper and work out how to do the maths first. Once you are able to perform the calculation manually and come up with the correct answer, then we can help you write code to implement that solution.

  3. #3
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 04
    Location
    The Granite City
    Posts
    21,735

    Re: i want formula for this calculation

    Hello,

    Agreed with John.

    I have moved this question to the Maths Forum.

    Thanks

    Gary

  4. #4
    Hyperactive Member Lenggries's Avatar
    Join Date
    Sep 09
    Posts
    325

    Re: i want formula for this calculation

    This is a really trivial algebra question. You have two points (x1,y1) = (2.0, 0.9) and (x2,y2) = (3.75, 0.8), and want to find (x3,y3) = (2.85, ???) (aka you want to solve for y3 given x3 = 2.85). I'm going to assume all three points lie on the same line (If that is not the case, then you have not provided enough information to solve this problem).

    The formula for a line is y = ax + b, where b is the y-intercept and a is the slope. Given that you have two points, you can easily solve for both a and b:

    a = (y1-y2)/(x1-x2)
    b = (x1*y2 - x2*y1)/(x1-x2)

    I'll leave it as an exercise for you to actually solve these equations given the two points you have. After that, simply insert the results into the equation of the line to get:
    y3 = a * 2.85 + b
    Last edited by Lenggries; Aug 3rd, 2012 at 09:37 AM. Reason: typo

  5. #5
    .NUT jmcilhinney's Avatar
    Join Date
    May 05
    Location
    Sydney, Australia
    Posts
    80,816

    Re: i want formula for this calculation

    Quote Originally Posted by Lenggries View Post
    This is a really trivial algebra question.
    Exactly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •