Question: Write a program to display the following pattern on the screen. Your program must prompt the user for the number of lines to be printed
Write a program to display the following pattern on the screen. Your program must prompt the user for the number of lines to be printed and the desired width between the left and right figures. Note that the number of lines must be an even number. If the number of lines entered is an odd number, then your program must display a message 'Invalid input - number of lines must be even' and exit.
Sample Input: umber of lines? 10 Width between left and right figure? 3 Output: x * * t
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
