Nested Loops Modulus

Good Evening good people!

I am new to C++ and i wanted to ask how could i create 1-3-5-3-1 using nested loops or modules, can someone plz give me an example, thank you
you probably want to move this to the beginners section...

edit: some pseudo code:

foreach(iterator in [1, 3, 5, 3, 1]) echo(iterator, (iterator != end([1, 3, 5, 3, 1]) ? "-" : "");

im not sure why you would need nested for loops. you could also make the iterator +=2 until it hits 5 then go down
Last edited on
1st i wanna say thank you for just responding, i am grateful but i did move to the beginner section which i truly i am, but can i show you what i have or can you give me a c++ code printing stars on diffrent lines in this order 1-3-5-3-1
Topic archived. No new replies allowed.