Question: Please help me solve this problem with c++ language. Your efforts are appreciated ! Thank you very much ! CPSC 1160: ASSIGNMENT 2[25 MARKS] Exercise

Please help me solve this problem with c++ language. Your efforts are appreciated ! Thank you very much !

Please help me solve this problem with c++ language. Your efforts are

appreciated ! Thank you very much ! CPSC 1160: ASSIGNMENT 2[25 MARKS]

CPSC 1160: ASSIGNMENT 2[25 MARKS] Exercise 1 [20 marks] Write a program that will ask the user for two numbers First is a base (a number between 1-16) 0123456789ABCDEF o Second is a length of the sequences ( it will always be less than or equal to 6) Your program should then generate all possible sequences of the given length for the given base. Your program should then print out all the sequences and the number of sequences that were generated YOUR SOLUTION MUST BE RECURSIVE You should write at least three functions int main() Which is the main function. Keep it brief generate(int, vector&, string & ,int ) Which should be a recursive function that generates all sequences Sample output 1202 1020 Enter u base3 1111 Enter a leng:h4 0202 C111 0020 2222 2102 2011 2210 1102 1222 1011 1210 0210 0222 0102 C011 2122 2002 2201 2110 1002 1122 12C1 1110 0122 0002 0201 0110 2022 2221 2101 2010 1022 1221 1101 1010 0022 0221 Cici 0010 2212 2121 2001 2200 1212 1121 1200 0212 0200 0121 COC1 2112 2021 2220 2100 1112 1021 1220 1100 0112 C220 0021 0100 2012 2211 2120 2000 1012 1211 1120 1000 0012 0211 C120 0000 2202 2111 2020 Count = 81 Note: I broke this into columns in word for readability, this is not how you have to output it Submissions Make sure that your code is neat and is well commented [5 marks] Check that all of your programs work the way they are intended to work by running them with different inputs Submit to D2L a zip/archive file containing only the .cpp you have written

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!