diff options
Diffstat (limited to 'InClassExercise7')
| -rw-r--r-- | InClassExercise7/Loops.cpp | 6 | ||||
| -rw-r--r-- | InClassExercise7/Source.cpp | 8 |
2 files changed, 6 insertions, 8 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) { diff --git a/InClassExercise7/Source.cpp b/InClassExercise7/Source.cpp index 7160e51..4317f95 100644 --- a/InClassExercise7/Source.cpp +++ b/InClassExercise7/Source.cpp @@ -10,15 +10,11 @@ using std::cout; using std::cin; using std::endl; -void ForLoopExamples(); -void WhileLoopExamples(); -void DoWhileLoopExamples(); - int main() { ForLoop(15); - WhileLoop(10); - DoWhileLoop(8); + //WhileLoop(10); + //DoWhileLoop(8); return 0; }
\ No newline at end of file |