Kolyach

1.3

Sep 9th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     setlocale(LC_ALL,"russian"); //bx+c=0
  8.     float b, c, x;
  9.     cout << "Введите два числа: ";
  10.     cin >> b >> c;
  11.     if (b!=0) {
  12.             x=-c/b;
  13.             cout << "X=" << x << endl;
  14.     }
  15.     else {
  16.         cout << "Нет корней";
  17.     }
  18. }
Add Comment
Please, Sign In to add comment