Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.62 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3.  
  4.  
  5.  
  6. int main( ) {
  7.  
  8.     int a;
  9.     int b;
  10.     int c;
  11.     scanf(" %d", a);
  12.      scanf(" %d", b);      
  13.     scanf(" %d", c);
  14.            
  15.             if (a==0 && b==0)
  16.             {
  17.                 if (a==0)
  18.                 {
  19.                     if (c==0)
  20.                     {
  21.                         int re;
  22.                         int d;
  23.                         int im;
  24.                         re=b/(2*a);
  25.                         d = b * b - (4 * a * c);
  26.                         im = abs(d) / (2 * a);
  27.                         if (d>0)
  28.                         {
  29.                             if (d<0)
  30.                             {
  31.                                 int x1;
  32.                                 int x2;
  33.                                 x1 = re;
  34.                                 x2 = x1;
  35.                                 return 0;
  36.                             }
  37.                             else
  38.                             {
  39.                                 return 0;
  40.                             }
  41.                         }
  42.  
  43.                     }
  44.                     else
  45.                     {
  46.                         int x1;
  47.                         int x2;
  48.                         x1 = b / a;
  49.                         x2 = 0;
  50.                         pirntf = ("%d, x1");
  51.                         pirntf = ("%d, x2");
  52.                         return 0;
  53.  
  54.                     }
  55.                 }
  56.                 else
  57.                 {
  58.                     int x;
  59.                     x = c / b;
  60.                     pirntf = ("%d, x");
  61.                     return 0;
  62.                 }
  63.             }
  64.  
  65.  
  66. retur 0;
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement