Create a string variable containing your full name (with spaces) 2) print the string as shown below 3) Create a blank 5x10 character array 4) Create a function printArray() that will print every row and column of the array 5) Create a function getNextCharacter() that gets passed the name string and returns the next non-blank character. If you have reached the end of the string then continue at the beginning. You may need to use a global variable 6) Create a function fillArray() that will fill the 2 dimensional array with the letters of your name skipping blanks. Use the above getNextCharacter() function to fill the array with only the characters in your last name. 7) Print the entire array. 8) Request a row number to print and use a sentinal loop to make sure the row number is valid. If not then request a row number again 9) Create a function printIter() that prints only the passed row using iteration 10) Create a function printRecur() that prints only the passed row using recursion 11) Print the requested row using printIter() and printRecur() Sample output: My name is: Prof Mike J Metaxas The array is: Row 0: ProfMikeJM Row 1: etaxasProf Row 2: MikeJMetax Row 3: asProfMike Row 4: JMetaxasPr Enter a row number: 2 Iterative: MikeJMetax Recursive: MikeJMetax c++ Back
Create a string variable containing your full name (with spaces) 2) print the string as shown below 3) Create a blank 5x10 character array 4) Create a function printArray() that will print every row and column of the array 5) Create a function getNextCharacter() that gets passed the name string and returns the next non-blank character. If you have reached the end of the string then continue at the beginning. You may need to use a global variable 6) Create a function fillArray() that will fill the 2 dimensional array with the letters of your name skipping blanks. Use the above getNextCharacter() function to fill the array with only the characters in your last name. 7) Print the entire array. 8) Request a row number to print and use a sentinal loop to make sure the row number is valid. If not then request a row number again 9) Create a function printIter() that prints only the passed row using iteration 10) Create a function printRecur() that prints only the passed row using recursion 11) Print the requested row using printIter() and printRecur() Sample output: My name is: Prof Mike J Metaxas The array is: Row 0: ProfMikeJM Row 1: etaxasProf Row 2: MikeJMetax Row 3: asProfMike Row 4: JMetaxasPr Enter a row number: 2 Iterative: MikeJMetax Recursive: MikeJMetax
c++
Trending now
This is a popular solution!
Step by step
Solved in 2 steps