
The first step is to identify the order in which the equation must be solved, by following PEMDAS (you might know it as BEDMAS):
Parenthesis (or Brackets)
Exponents
Multiplication and Division
Addition and Subtraction
My advice would be to add parenthesis, following these rules, if you are not very good at finding them immediately by sight.
So:
![4 - 5 / 2 * (\frac{1}{10x}) = 1\\\\4 - [(5/2)*(\frac{1}{10x})]=1\\\\4-(2.5*\frac{1}{10x})=1\\\\4-\frac{2.5}{10x}-1=0\\3-\frac{x}{4}=0\\\frac{x}{4}=3\\x=3*4\\x=12](https://tex.z-dn.net/?f=4%20-%205%20%2F%202%20%2A%20%28%5Cfrac%7B1%7D%7B10x%7D%29%20%20%3D%201%5C%5C%5C%5C4%20-%20%5B%285%2F2%29%2A%28%5Cfrac%7B1%7D%7B10x%7D%29%5D%3D1%5C%5C%5C%5C4-%282.5%2A%5Cfrac%7B1%7D%7B10x%7D%29%3D1%5C%5C%5C%5C4-%5Cfrac%7B2.5%7D%7B10x%7D-1%3D0%5C%5C3-%5Cfrac%7Bx%7D%7B4%7D%3D0%5C%5C%5Cfrac%7Bx%7D%7B4%7D%3D3%5C%5Cx%3D3%2A4%5C%5Cx%3D12)
We check our answer:
![x=12\\4 - [(5 / 2) * (1/10)*(x)] = 1\\4 - [(5 / 2) * (\frac{1}{10}) * (12))] = 1\\4 - [2.5 * (\frac{1}{10})*12] = 1\\4 - [(\frac{2.5}{10})*12] = 1\\4 - [(\frac{1}{4})*12] = 1\\4 - 3 = 1\\1=1](https://tex.z-dn.net/?f=x%3D12%5C%5C4%20-%20%5B%285%20%2F%202%29%20%2A%20%281%2F10%29%2A%28x%29%5D%20%3D%201%5C%5C4%20-%20%5B%285%20%2F%202%29%20%2A%20%28%5Cfrac%7B1%7D%7B10%7D%29%20%2A%20%2812%29%29%5D%20%3D%201%5C%5C4%20-%20%5B2.5%20%2A%20%28%5Cfrac%7B1%7D%7B10%7D%29%2A12%5D%20%3D%201%5C%5C4%20-%20%5B%28%5Cfrac%7B2.5%7D%7B10%7D%29%2A12%5D%20%3D%201%5C%5C4%20-%20%5B%28%5Cfrac%7B1%7D%7B4%7D%29%2A12%5D%20%3D%201%5C%5C4%20-%203%20%3D%201%5C%5C1%3D1)
We are right!
So,
.
If one kilogram is equal to 35.274 then just multiply 1.5 by 35.274.
1.5 * 35.274 = <span>52.911</span>
<span>#include <iostream>
using namespace std;
class InventoryTag {
public:
InventoryTag();
int getQuantityRemaining() const;
void addInventory(int numItems);
private:
int quantityRemaining;
};
InventoryTag::InventoryTag() {
quantityRemaining = 0;
}
int InventoryTag::getQuantityRemaining() const {
return quantityRemaining;
}
void InventoryTag::addInventory(int numItems) {
if (numItems > 10) {
quantityRemaining = quantityRemaining + numItems;
}
}
int main() {
InventoryTag redSweater;
int sweaterShipment = 0;
int sweaterInventoryBefore = 0;
sweaterInventoryBefore = redSweater.getQuantityRemaining();
sweaterShipment = 25;
cout << "Beginning tests." << endl;
// FIXME add unit test for addInventory
/* Your solution goes here */
cout << "Tests complete." << endl;
return 0;
}</span>