Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int div(){
- int a1=3,b1=3,c1=3;
- int a2=1,b2=1,c2=1;
- if (a2==0 || b2==0 || c2==0) {
- printf ("Divide by zero!");
- return 0;
- }
- float x,y,z;
- x=a1/a2;
- y=b1/b2;
- z=c1/c2;
- if (x!=0) {
- if (x!=1) printf ("%fx^2 + ", x);
- else printf ("x^2 + ");
- }
- if (y!=0) {
- if (y!=1) printf ("%fx + ", y);
- else printf ("x");
- }
- if (z!=0) printf (" + %f", z);
- printf (" = 0");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement