Question: In C++, a) Write a recursive function, printZPattern, which prints out a pattern of zeros as follows: printZPattern(3) outputs: 000 00 0 printZPattern(1) outputs: 0
In C++,
a) Write a recursive function, printZPattern, which prints out a pattern of zeros as follows:
printZPattern(3) outputs:
000
00
0
printZPattern(1) outputs:
0
printZPattern(4) outputs:
0000
000
00
0
b) How would you modify your second function to print a mirror pattern, such as: printZPattern2(3) outputs:
000
0
00
000
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
