From 74723928902a4fdcf717f9ee7005c2da0028d66c Mon Sep 17 00:00:00 2001 From: Asahel Date: Thu, 1 Feb 2024 20:37:02 -0800 Subject: Implemented ForLoop --- InClassExercise7/Loops.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'InClassExercise7/Loops.cpp') 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 #include "Loops.h" void ForLoop(size_t n) { - + for (auto i = 0; i <= n; i++) { + std::cout << i << " "; + } } void WhileLoop(size_t n) { -- cgit v1.2.3