Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mastering Apache Cassandra 3 X An Expert Guide To Improving Database Scalability And Availability Without Compromising Performance

Authors: Aaron Ploetz ,Tejaswi Malepati ,Nishant Neeraj

3rd Edition

1789131499, 978-1789131499

More Books

Students also viewed these Databases questions

Question

What do you understand by Mendeleev's periodic table

Answered: 1 week ago