summaryrefslogtreecommitdiffstats
path: root/solutions/c/01-1.cpp
diff options
context:
space:
mode:
authorGustav Sörnäs <gusso230@student.liu.se>2019-12-04 07:02:31 +0100
committerGustav Sörnäs <gusso230@student.liu.se>2019-12-04 07:02:31 +0100
commit831755fdc6d430bd8781da1897270cf2934bc858 (patch)
treef1d6e5609363f98534a87eb9203a7623fb409371 /solutions/c/01-1.cpp
downloadaoc-831755fdc6d430bd8781da1897270cf2934bc858.tar.gz
Initial commit
Diffstat (limited to 'solutions/c/01-1.cpp')
-rw-r--r--solutions/c/01-1.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/solutions/c/01-1.cpp b/solutions/c/01-1.cpp
new file mode 100644
index 0000000..fcb593a
--- /dev/null
+++ b/solutions/c/01-1.cpp
@@ -0,0 +1,8 @@
+#include<iostream>
+
+int main() {
+ int mass, sum = 0;
+ while (std::cin >> mass) sum += (mass / 3) - 2;
+ std::cout << sum << std::endl;
+}
+