help with C programs

abbd1990

abbd1990

@abbd1990-WLnI62 Oct 25, 2024
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

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • raj87verma88

    raj87verma88

    @raj87verma88-ZpL2Wn Apr 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.
  • raj87verma88

    raj87verma88

    @raj87verma88-ZpL2Wn Apr 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
  • abbd1990

    abbd1990

    @abbd1990-WLnI62 Apr 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 ) ;
    }
  • abbd1990

    abbd1990

    @abbd1990-WLnI62 Apr 12, 2009

    Are there any help or not ??
  • raj87verma88

    raj87verma88

    @raj87verma88-ZpL2Wn Apr 12, 2009

    I guess most of our computer guys are a bit busy. Wait for some time, someone would definitely answer.
  • abbd1990

    abbd1990

    @abbd1990-WLnI62 Apr 12, 2009

    thank you my dear
    i appreciate your helpness
    i am still waiting >>
  • Yamini L

    Yamini L

    @yamini-uMEVDQ Apr 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..
  • pradeep_agrawal

    pradeep_agrawal

    @pradeep-agrawal-rhdX5z Apr 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