im making a code that will solve a simple algebra problem in the form of y=mx+b, and im not sure how to assign the value of the math done to x
this is the code, how do i make the result of [(y-b)/m] assign to x?Code:#include <cstdlib> #include <iostream> using namespace std; int main(int argc, char *argv[]) { int x = 0; int m = 0; int b = 0; int y = 0; cout << "Y = _\n"; cin >> y; cout << "M = _\n"; cin >> m; cout << "B = _\n"; cin >> b; ((y - b)/m) = x; //This is the problem spot cout << "X =\n"; cout << x; system("PAUSE"); return EXIT_SUCCESS; }



LinkBack URL
About LinkBacks



