Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- setlocale(LC_ALL,"russian"); //bx+c=0
- float b, c, x;
- cout << "Введите два числа: ";
- cin >> b >> c;
- if (b!=0) {
- x=-c/b;
- cout << "X=" << x << endl;
- }
- else {
- cout << "Нет корней";
- }
- }
Add Comment
Please, Sign In to add comment