summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--5p3.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/5p3.cpp b/5p3.cpp
index 58d5fbf..734f367 100644
--- a/5p3.cpp
+++ b/5p3.cpp
@@ -2,11 +2,17 @@
/*
*
- * Description
+ * 5.3
*
*
*/
int main () {
+
+ int sum = 0;
+ int val = 1;
+ while (val <= 10 && (sum += val, ++val));
+
+ std::cout << sum << std::endl;
return 0;
}