This is a step in the right direction, but I need the limit to not go higher than the number 5.
Next step after that, is to figure out how to remove subsequent numbers in each block of numbers.
It is still not really clear what you want to achieve. If you want a vector to contain 20 items which are slightly random from 1:5 then why can't the following suffice?
Sorry I wasn't clear enough. From my original post, that is the set of numbers I want. So I need to create an input that comes up with the output "2 3 4 5 1 3 4 5 1 2 4 5 1 2 3 5 1 2 3 4".
I just went back and read the FAQs and changed it to a homework tag because it is. My apologies, should have clarified and been informed. However, it is an example not the exact question from an assignment.
Again, not looking for just an answer because that's not the point. I'm aiming to learn the language, not get the best grade.
I will hint at my solution. The final vector is 1:5 repeated 5 times except the elements at positions 1, 7, 13, 19, and 25 have been removed. Think about the pattern of those indices and what notation is used to remove an element from a vector using [.
Try reviewing how you index elements of a vector if you want to exclude some. To get the 5th element you write x[5]. How do you get everything except the 5th element?