CrazyEngineers
  • help with C programs

    abbd1990

    Member

    Updated: Oct 25, 2024
    Views: 1.0K
    hi to all
    i hope you will be good

    can you please help me to solve these programs and convert them to c programs

    1- find the roots of the equation ( ax2 + bx + c = 0 ) by calling 3 functions from the main function , were first function for reading the coffessionts a,b & c , second function for checking the coffessiont of x2 (a) is not zero , and the decrement is not negative , exiting in other case , third function for finding the roots and displying them .

    R = -b _+ sqrt(b2 - 4ac) / 2a

    2- evaluate and displying the area of any triangle whose sides are given by using a function

    where a = sqrt ( S (s-a) * (s-b) * ( s-c ) )
    and s = (a+b+c) / 2

    3- evaluate the angles of a triangle given its sides by usiing function .

    4- find the real root of the equation
    3x# + 5X - 26 = 0
    by using function

    5- evaluate the area under the curve 3X2 + 2X + 5
    where 0 <= X <= 3
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • raj87verma88

    MemberApr 9, 2009

    Have you tried these. Post whatever you did here, so that you may analyze where you went wrong, and, we know that you had worked hard and are not one of the free lunch seekers.
    Are you sure? This action cannot be undone.
    Cancel
  • raj87verma88

    MemberApr 9, 2009

    @abbd: I checked your previous posts. It seems everywhere you have asked questions which I feel are all related to your assignments or something. You are getting your college work done from us without giving it a shot. You have got your answers previously from some of our members but not this time. Your bad luck dude, you met me first, not some soft hearted person.
    Do as I told you in my post above and then you can expect help this time.

    P.S. All free codes will be deleted
    Are you sure? This action cannot be undone.
    Cancel
  • abbd1990

    MemberApr 9, 2009

    ok dear don't be angry

    i tried to solve the first and fifth programs
    the first one i can't reach any result
    but i think the fifth one i success to solve it
    and this is the code :-

    #include<stdio.h>
    #include<math.h>
    double f (double x) ;
    double area (double a,double b,int n) ;
    int main(void)
    {
    int n ;
    scanf("%d",&n) ;
    printf ("the area is %7.4f\n", area (0.0 , 3.0 , n)) ;
    return 0 ;
    }
    double f(double x)
    {
    return ((3*x*x)+(2*x)+5) ;
    }
    double area (double a,double b,int n)
    {
    double width = (b-a)/n ;
    double sum =(f(a) + f(b)) / 3.0 ;
    double xvalue ;
    for(xvalue = a+width ; xvalue < b;xvalue+=width )
    sum+=f(xvalue) ;
    return ( sum* width ) ;
    }
    Are you sure? This action cannot be undone.
    Cancel
  • abbd1990

    MemberApr 12, 2009

    Are there any help or not ??
    Are you sure? This action cannot be undone.
    Cancel
  • raj87verma88

    MemberApr 12, 2009

    I guess most of our computer guys are a bit busy. Wait for some time, someone would definitely answer.
    Are you sure? This action cannot be undone.
    Cancel
  • abbd1990

    MemberApr 12, 2009

    thank you my dear
    i appreciate your helpness
    i am still waiting >>
    Are you sure? This action cannot be undone.
    Cancel
  • Yamini L

    MemberApr 12, 2009

    hey abbd1990,

    do post your code for first program even if you dont get the output,so that we can easily make out where the bug is..
    Are you sure? This action cannot be undone.
    Cancel
  • pradeep_agrawal

    MemberApr 12, 2009

    abbd1990, post the code of your other problems (even if they are non-working). That will help us in identifying where you are stuck.

    -Pradeed
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register