SHARE
TWEET

Untitled

a guest Sep 20th, 2019 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. t = input('введите t = ');
  2. a = t - 2;
  3. b = 4*t-1;
  4. c = 3*t - 5;
  5. D = b^2 - 4*a*c;
  6.  
  7. if D < 0
  8.     disp('уравнение не имеет корней: D < 0');
  9. elseif D == 0
  10.     x = b/c;
  11.     disp('уравнение имеет один корень: D == 0');
  12.     disp(x);
  13. else
  14.     x1 = (-b - sqrt(d)) / (2*a);
  15.     x2 = (-b + sqrt(d)) / (2*a);
  16.     disp('уравнение имеет два корня: D > 0');
  17.     disp(x1);
  18.     disp(x2);
  19. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top