aboutsummaryrefslogtreecommitdiff
path: root/InClassExercise7/Loops.cpp
diff options
context:
space:
mode:
authorAsahel <[email protected]>2024-02-01 20:37:02 -0800
committerAsahel <[email protected]>2024-02-01 20:37:02 -0800
commit74723928902a4fdcf717f9ee7005c2da0028d66c (patch)
treee473a7b0b65e3a55dedc6f3596790e63c25db2f1 /InClassExercise7/Loops.cpp
parentFinshed (diff)
downloadin-class-exercise-7-asahellt-74723928902a4fdcf717f9ee7005c2da0028d66c.tar.xz
in-class-exercise-7-asahellt-74723928902a4fdcf717f9ee7005c2da0028d66c.zip
Implemented ForLoop
Diffstat (limited to 'InClassExercise7/Loops.cpp')
-rw-r--r--InClassExercise7/Loops.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/InClassExercise7/Loops.cpp b/InClassExercise7/Loops.cpp
index 01f6f1d..1a99ec2 100644
--- a/InClassExercise7/Loops.cpp
+++ b/InClassExercise7/Loops.cpp
@@ -1,9 +1,11 @@
-
+#include <iostream>
#include "Loops.h"
void ForLoop(size_t n) {
-
+ for (auto i = 0; i <= n; i++) {
+ std::cout << i << " ";
+ }
}
void WhileLoop(size_t n) {