Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. int div(){
  2.     int a1=3,b1=3,c1=3;
  3.     int a2=1,b2=1,c2=1;
  4.     if (a2==0 || b2==0 || c2==0) {
  5.         printf ("Divide by zero!");
  6.         return 0;
  7.     }
  8.     float x,y,z;
  9.     x=a1/a2;
  10.     y=b1/b2;
  11.     z=c1/c2;
  12.     if (x!=0) {
  13.         if (x!=1) printf ("%fx^2 + ", x);
  14.         else printf ("x^2 + ");
  15.     }
  16.     if (y!=0) {
  17.         if (y!=1) printf ("%fx + ", y);
  18.         else printf ("x");
  19.     }
  20.     if (z!=0) printf (" + %f", z);
  21.     printf (" = 0");
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement