Question: C programming Language NOT C++ but C Part a) Write a recursive function that produces the pattern #1 shown below. In the sample, the size
C programming Language NOT C++ but C
Part a) Write a recursive function that produces the pattern #1 shown below. In the sample, the size of the pattern is 4. The function should work for any size n. Submit the whole program including the main function. Part b) Modify the function written in the previous part so that it produces the pattern #2 instead, as shown below. Make sure the functions are recursive: i.e. a function that calls itself.
QUESTION 9 (10 points) Part a) write a recursive function that produces the pattern #1 shown below. In the sample, the size of the pattern is 4. The function should work for any size n. Submit the whole program including the main function Part b) Modify the function written in the previous part so that it produces the pattem #2 instead, as shown below. Ma ke sure the functions are recursive: ie. a finction t at calls tsel Pattern 1 Pattern 2 Enter n: 4 Enter n: 4 1 2 3 4 1 2 3 1 2 1 2 1 2 3 1 2 3 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
