Question: C/C++ Programming 1 (Section 136321) C1A2E2 (5 points-C Program Exclude any existing source code files that may already be in your IDE project and add
C/C++ Programming 1 (Section 136321) C1A2E2 (5 points-C Program Exclude any existing source code files that may already be in your IDE project and add a new one, naming it CIA2E2 main.c. Write a program in that file to display a triangle of characters on the screern. 3 5 Your program must: 1. prompt the user to enter any positive decimal integer value: 2. use nested "for" loops to display that number of lines of characters on the console screen starting in column 1, with each successive line containing one less character than the previous. Each line must end with a "diagonal" character and any preceding characters must be "leader" characters. The last line will only contain the diagonal character. For example, if the user inputs a 4, the leader character is . and the diagonal character is e. the following will be displayed 8 10 12 13 AAM 15 16 17 18 19 20 21 3. use the exact identifier names LEADER CHAR and DIAGONAL_CHAR for macros that represent the desired leader and diagonal characters, respectively. Embedding the actual leader and/or diagonal characters themselves for their actual names such as"at "wave" "pound" "hash" "dollar "percent"dot" tWo "five". etc.) in the body of your code or in any of your comments is an inappropriate use of "magic numbers" 23 Manually re-run your program several times, testing with several different line counts, leader characters 24 and diagonal characters. To change the leader and diagonal characters you must change the values 5 associated with the LEADER CHAR and DIAGONAL_CHAR macros and recompile 6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
