#include <iostream>

#include <conio.h>

#include <math.h>

//declare variables

using std::cin;

using std::cout;

int main()

{

double rateOne, rateTwo, mOne, mTwo;

cout << "Enter rate one: ";

cin >> rateOne;

cout << "Enter rate two: ";

cin >> rateTwo;

cout << "Enter 'm' one: ";

cin >> mOne;

cout << "Enter 'm' two: ";

cin >> mTwo;

//Peform calculations

double calculatedRate = rateOne * rateTwo;

double calculatedM = mTwo * mOne;

double sqauredRate = calculatedRate * calculatedRate;

cout << calculatedM << "=" << calculatedRate;

getche();

return 0;

}

-----------------------------------------------------

Okay thats the latest part of my code. I am trying to have this program, basically solve this algebraic expression (grahams law):

Now to solve this in real life without the use of a computer program you would be given the value of three variables. Let's say I was given rateTwo, mOne, and mTwo. Given those three numbers, you could solve for the unknown variable, rateOne. I'll use some made up numbers so you can see how I would usually do this:

rateOne = 'X'

rateTwo = 8

mOne = 4

mTwo = 16

1: X/8 = The square root of (16/4)

2: 1/8x = The sqaure root of 4

3: 1/8x = 2

4: x = 16

However the problem I run into is if I enter in 'X' for either rateOne, rateTwo, mOne, or mTwo, it automatically assigns X a value and uses that number ,rather then following the process above, and allowing me to continue to solve for x.