Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Chapter 6 problem 42 Require the upper half of the figure to be one of the same

ID: 3619120 • Letter: C

Question

 Chapter 6 problem 42
Require the upper half of the figure to be one of the same shapes as are allowed in problem 40, with two copies of the figure ( one upside down) used to create the whole
figure. Problem 42 has a height twice the height of problem 42. Chapter 6 problem 40 is not assignmed, but may be used in creasting a solution for problem 42.

problem 40.
Write a functiont hat creates the following pattern, given the height (number of rows):


*
***
*****
*******
*********
***********

Problem 42.

Write a function that creates the following pattern, given the height (number of rows).


*
***
*****
*******
*********
*********
*******
*****
***
*




Width = 1+ N*(height - 1) where N is the number of asterisks added for the next row.
Note that the above formula for N is for the single triangle in problem 40.
In the example in the book the values N is 2. With other width and height values, the value may bot be 2.
Provide a user interface that enforces this requirement. If the value of N is not an integral value, give the user an error message.
Make the user interface user friendly.



Explanation / Answer

please rate - thanks I don't understand your comments. the input 10 or 11, willgive you the illustration you provided. message me if anyquestions/comments, and I can fix it #include #include void triangle(int); int main() {int n; printf("Enter the number of rows: "); scanf("%d",&n); triangle(n); getch(); return 0; } void triangle(int n) {int i,j; for(i=0;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote