Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void div(){
- float a1=2,b1=3,c1=3;
- float a2=1,b2=5,c2=1;
- if (a2==0 or b2==0 or 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