From 9b29f077c6a99c22f174cc510f438590c0f8de34 Mon Sep 17 00:00:00 2001 From: Jarek Jeda Date: Sun, 5 May 2024 16:49:55 +0200 Subject: [PATCH] generate-Sequence --- homework/generate-sequence/generateSequence.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/homework/generate-sequence/generateSequence.hpp b/homework/generate-sequence/generateSequence.hpp index 4b1ac80f..1a5287c3 100644 --- a/homework/generate-sequence/generateSequence.hpp +++ b/homework/generate-sequence/generateSequence.hpp @@ -1,7 +1,11 @@ #pragma once #include +#include std::vector generateSequence(int count, int step) { - // TODO: Implement me :) - return {}; + std::vector elements; + for(int i = 0; i < count; ++i) { + elements.push_back(step * (i +1)); + } + return elements; }