Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C programming language Test your program with: pattern1: height = 8, width = 20 pattern2: height=width=9 2. Write a single program that will use a
C programming language
Test your program with:
pattern1: height = 8, width = 20
pattern2: height=width=9
2. Write a single program that will use a nested for loop to create pattern 1 and pattern 2 shown below. The program should prompt the user for the height (number of rows) and width (number of characters per line) for pattern 1. Before drawing pattern 1, ask the user to end a single value for the height and width of the triangle for pattern 2. (Note the height and width for Pattern 2 should be the same value, so only one value should be requested from the user) For pattern 1, make use of an if structure inside a pair of nested loops to instruct the program what to print on the various lines and columns. The entire pattern can be made using equal signs), asterisks( and spaces r pattern 2 make use of an if structure inside a pair of nested loops to determine which character to print. The entire pattern can be made from spaces) and asterisksStep 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