please help, my hw is due tomorrow and i'm somewhat of a noob in my c++ class which is due tomorrow. I'm understand the language somewhat but i'm having trouble putting the pieces together, specifically transposing array and reversing the string.
Below is my hw and my code that i have written so far. i got stuck at writing the transposing portion, and i keep getting an error in my reverse string. can someone please take a look and critique me please. or show me what i did wrong.
Write a C++ program that prompts the user with the following options:
Matrix String Quit
(1) If the user selects “M” or “m” then call a user-defined function called float average (void) that will the following:
a. Prompt the user to enter three sets of three numbers (type float) and store the numbers in a 3 x 3 array.
b. Find the transpose of the matrix and print the results in this function.
c. Find the sum of the original matrix and transposed matrix and print the original, transpose, and the sum matrices in this function. Note the output should be in three rows and three columns format with space in between each column as follows:
1 2 3
2 0 9
12 3 7
(2) If the user selects “S” or “s” then call a user-defined function void rev_str (void) that
a. Prompts the user to enter a string and store it into one-dimensional array.
b. Replace the content of the string with the string reversed and save into another
array.
c. Print both the original string and reversed one in this function.
If the user enters “Q” or “q” then you should terminate the program. If the user enters any other selection it should prompts the user invalid selection and try again.