1) AIM: C Program to Evaluate algebraic Expression (ax+b)/(ax-b)

2) ALGORITHM:

Step1: start
Step2: input a,b,x,s
Step3: s= (a*x+b)/(a*x-b)
Step4: Result s
Step 5: stop

3) FLOW CHART:
4) PROGRAM:

main()

{

            int a,b,x;

            float s;



            clrscr();



            printf("enter the values of a,b,x...");

            scanf("%d%d%d",&a,&b,&x);



            s=(a*x+b)/(a*x-b);

            printf("the value of s=%f",s);



            getch();

}

5) Result:

Enter the values of a,b,x… 1 3 2
The value of s=5

0 comments