Code | Action |
---|---|
100 | Input a number to accumulator |
101 | Output a number from accumulator |
102 N | Add the number from memory location N to the accumulator |
103 N | Subtract the number from memory location N to the accumulator |
104 N | Multiply the accumulator by the number from memory location N |
105 N | Divide the accumulator b y the number from memory location N |
106 N | Store the accumulator in memory location N |
107 N | Load the accumulator from memory location N |
108 M N | Store the constant M in memory location N |
108 32 1 108 9 2 108 5 3 100 103 1 104 3 104 2 102
INPUT SUB 32 MUL 5 DIV 9 OUTPUT
#includeusing namespace std; int main() { float tempInF, tempInC; cout << "Enter the temperature in Fahrenheit" << endl; cin >> tempInF; tempInC = (tempInF-32)*5/9; cout << "The temperature in Celsius is " << tempInC << endl; return 0; }