Write a generic & parameterized function that is able to generate the following (infinite) pattern: 2, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 2,
This is not a random pattern hint to understand how the code has been created: if you count the number of 3s sandwitched between 2s you will notice that it creates the same pattern 2 | 3 3 | 2 | 3 3 3 | 2 | 3 3 3 | 2 | 3 3 | 2 | 3 3 3 | 2 | 3 3 3 | 2 | 3 3 3 … 2 3 3 2 3 3 3
Aucun commentaire:
Enregistrer un commentaire