AIM: To evaluate algebraic exp(ax+b)/(ax-b)
ALGORITHM:
Step1: start
Step2: input a,b,x,s
Step3: s= (a*x+b)/(a*x-b)
Step4: Result s
Step 5: stop
FLOW CHART:
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);
}
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);
}
Result:
Enter the values of a,b,x… 1 3 2
The value of s=5
The value of s=5