aboutsummaryrefslogtreecommitdiff
path: root/week07/ex1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'week07/ex1.cpp')
-rw-r--r--week07/ex1.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/week07/ex1.cpp b/week07/ex1.cpp
new file mode 100644
index 0000000..8b630ad
--- /dev/null
+++ b/week07/ex1.cpp
@@ -0,0 +1,13 @@
+#include <iostream>
+
+void coordSum(double x1, double y1, double x2, double y2, double& sumx, double& sumy) {
+ sumx = x1 + x2;
+ sumy = y1 + y2;
+}
+
+int main() {
+ double x1, y1, x2, y2, sumx, sumy;
+ std::cin >> x1 >> y1 >> x2 >> y2;
+ coordSum(x1, y1, x2, y2, sumx, sumy);
+ std::cout << sumx << " " << sumy << std::endl;
+}