Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int a,b,c,x;
- scanf("%d%d%d%d",&x,&a,&b,&c);
- if(x<0)
- {
- printf("We can find the value of X using Bashkara's Formula.\n");}
- else if(a<0)
- {
- a=(((-b*x)-c)/(x*x));
- printf("%.2f\n",(float)a);
- }
- else if(b<0)
- {
- b=((-a*(x*x))-c)/(x);
- printf("%.2f\n",(float)b);
- }
- else
- {
- c=(-a*(x*x)-b*x);
- printf("%.2f\n",(float)c);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment