Question
Print pattern Write a function void print_line_pattern(int no_gap, int no_pattern, char p). p is of type character and is supplied as a parameter. It will
Print pattern
Write a function void print_line_pattern(int no_gap, int no_pattern, char p). p is of type character and is supplied as a parameter. It will print gap no_gap times. Then it will print the character p no_pattern times. Then go to next line.
From main(), take input from user how many lines L will be there.
Take another input for pattern. It will be a character type.
Pass this pattern as a parameter to the function print_line_pattern(..., , pattern);
Then write a for loop to use this function to print L lines from high to low as follows
********************* *************** ************ ********
Sample code and output for star and low to high is given below
Run your program for 1 line, 2 lines, and 10 lines
Give your code below
Give output for all input
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started