about summary refs log tree commit diff stats
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/013arithmetic12
1 files changed, 6 insertions, 6 deletions
diff --git a/cpp/013arithmetic b/cpp/013arithmetic
index 7aca4264..47d14b2c 100644
--- a/cpp/013arithmetic
+++ b/cpp/013arithmetic
@@ -13,7 +13,7 @@ case ADD: {
   vector<int> arg1 = read_memory(p->ingredients[1]);
   assert(arg1.size() == 1);
   vector<int> result;
-  result.push_back(arg0[0]+arg1[0]);
+  result.push_back(arg0[0] + arg1[0]);
   trace("run") << "product 0 is " << result[0];
   write_memory(p->products[0], result);
   break;
@@ -57,7 +57,7 @@ case SUBTRACT: {
   vector<int> arg1 = read_memory(p->ingredients[1]);
   assert(arg1.size() == 1);
   vector<int> result;
-  result.push_back(arg0[0]-arg1[0]);
+  result.push_back(arg0[0] - arg1[0]);
   trace("run") << "product 0 is " << result[0];
   write_memory(p->products[0], result);
   break;
@@ -102,7 +102,7 @@ case MULTIPLY: {
   assert(arg1.size() == 1);
   trace("run") << "ingredient 1 is " << arg1[0];
   vector<int> result;
-  result.push_back(arg0[0]*arg1[0]);
+  result.push_back(arg0[0] * arg1[0]);
   trace("run") << "product 0 is " << result[0];
   write_memory(p->products[0], result);
   break;
@@ -147,7 +147,7 @@ case DIVIDE: {
   assert(arg1.size() == 1);
   trace("run") << "ingredient 1 is " << arg1[0];
   vector<int> result;
-  result.push_back(arg0[0]/arg1[0]);
+  result.push_back(arg0[0] / arg1[0]);
   trace("run") << "product 0 is " << result[0];
   write_memory(p->products[0], result);
   break;
@@ -191,11 +191,11 @@ case DIVIDE_WITH_REMAINDER: {
   vector<int> arg1 = read_memory(p->ingredients[1]);
   assert(arg1.size() == 1);
   vector<int> result0;
-  result0.push_back(arg0[0]/arg1[0]);
+  result0.push_back(arg0[0] / arg1[0]);
   trace("run") << "product 0 is " << result0[0];
   write_memory(p->products[0], result0);
   vector<int> result1;
-  result1.push_back(arg0[0]%arg1[0]);
+  result1.push_back(arg0[0] % arg1[0]);
   trace("run") << "product 1 is " << result1[0];
   write_memory(p->products[1], result1);
   break;