I am trying to figure out an assignment that requires me to use recursion rather than loops to output a certain number of asterisks in a certain format.
basically, I am required to collect input from the user, and output something that looks like this
Number or asterisks: 5 ***** **** *** ** * ** *** **** *****
I am struggling to figure this out, as I keep thinking about ways to figure it out by using a loop rather than with recursion. How am I supposed to output a certain number of items and have it know when to form a new line without a loop?
I am really having a hard time with this, and if someone could just help me figure out the first half I have a feeling I can do the second myself. I bet this is going to be one of those moments where I facepalm and get mad at myself for not seeing the answer sooner! This is using c++ by the way, more specifically visual studio 2015.
Thanks guys.