Exclude any existing source code files that may already be in your IDE project and add a new one, naming it C1A2E2_main.
Posted: Sun Jul 03, 2022 11:23 am
Exclude any existing source code files that may already be in your IDE project and add a new one, naming it C1A2E2_main.c. Write a program in that file to display a triangle of characters. 1. Define two macros named LEADER_CHAR and DIAGONAL_CHAR whose replacement lists are character literals that represent the leader and diagonal characters, respectively, illustrated below. DO NOT refer to those characters literally or by their actual names ("circumflex" and "dollar") in other code or in any comments because doing so would be an inappropriate use of "magic numbers". 2. Prompt (ask) the user to enter any positive decimal integer value. 3. 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 more character than the previous. Each line must end with the diagonal character and any preceding characters must be leader characters. The first line will only contain the diagonal character. For example, if the user inputs a 4, the leader character is ^, and the diagonal character is $, the following will be displayed: $ ^$ ^^$ ^^^$ 4. DO NOT use more than two loop statements. Manually re-run your program several times, testing with several different line counts, leader characters, and diagonal characters. To change the leader and diagonal characters you must change the character literals associated with the LEADER_CHAR and DIAGONAL_CHAR macros and recompile. Submitting your solution Send an empty-body email to the assignment checker with the subject line C1A2E2_165483_U09471474 and with your source code file attached. See the course document titled "How to Prepare and Submit Assignments" for additional exercise formatting, submission, and assignment checker requirements.