Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- float a, b;
- cout << "Enter a: ";
- cin >> a;
- cout << "Enter b: ";
- cin >> b;
- cout << "Your equation is: " << a << "x + " << b << " = 0" << endl;
- cout << "Answer: x = " << (b * (-1)) / a;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement