Advertisement
sheredega

task 18

Nov 4th, 2022 (edited)
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     float a, b;
  7.     cout << "Enter a: ";
  8.     cin >> a;
  9.     cout << "Enter b: ";
  10.     cin >> b;
  11.     cout << "Your equation is: " << a << "x + " << b << " = 0" << endl;
  12.     cout << "Answer: x = " << (b * (-1)) / a;
  13.     return 0;    
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement