I have finally reached a point in c++ that I don't understand. We are halfway through the semester when my teacher assigns this:
"For this assignment, your program will have 3 functions (a, b, and c). So, your function prototypes will look like
void a();
void b();
void c();
and your main will look like
int main(){
a();
b();
c();
}
Each of your function definitions will need nested loops to do its job.
As always, make the first line of your program a comment telling me the class (CS 575), the homework #, and your name.
a. Prompt the user for the size of the patterns, then output the following patterns. You only need one input (all your patterns will be the same size). The following examples show what the patterns will look like if the patterns have size 5, but your program will work for any size. Don’t worry about a multi-digit size throwing off the alignment of your numbers. Output the pattern name (square, hollow square, etc.) along with each pattern, as shown below."
I know you are not fond of giving answers, and that is not what I'm looking for. I just need a nudge in the right direction. He asked that we output a square, hollow square, hollow square with diagonals, checkerboard, diamond, and a variety of number sequences all with just 3 functions.
Any advice would be appreciated since I don't know where to start at all...
Your teacher probably made a typo when he wrote the assignment so you should contact him for clarification or check his assignment board if he uses one. He's already given you the function prototypes and none of them take any kind of input so either those are wrong, or he meant for you to have more functions. Please point out to him that meaningful function names could have helped clarify the assignment as well ;).