Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CIC.. Programming I (Section 136321) AZE3 (4 points-C++ Pro 2 Exclude any existing source code files that may already be in your 3 naming it

image text in transcribed
CIC.. Programming I (Section 136321) AZE3 (4 points-C++ Pro 2 Exclude any existing source code files that may already be in your 3 naming it CA2E3-main.cpp Write a 4 screen. DE project and add a new one program in that file to display a triangle of characters on the 6 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 tarting in column 1, with each successive line containing one fewer character than the previous. Each line must end with a "diagonal" character and any preceding characters must be "leader characters. For example, if the user inputs a 4. the leader character is , and the diagonal character is s, the following will be displayed 10 12 13 14 15 16 17 18 19 20 21 AAA$ 3. use the exact identifier names LEADER_ CHAR and DIAGONAL CHAR for two const char variables that represent the desired leader and diagonal characters, respectively. Embedding the actual leader and/or diagonal characters themselves (or their actual names such poundhash dollar" "percent"dot 'to five" etc.l in the body of your code or in any of your comments is an inappropriate 3 Manually re-run your program several times, testing with several different ine counts. leader characters and diagonal characters. To change the leader and diagonal characters you must change the values ssociated with the LEADER CHAR and DIAGONAL CHAR variables and recompile 7Submitting your solution 8 Send your source code file to the Assignment Checker with the subject line C1A2E3 ID, where ID is your 9 9 character UCSD student ID See the course document titled "Preparing and Submitting Your Assignments" for additional exercise formatting. submission, and Assignment Checker requirements Hints: A "nested loop" is merely a loop of any type that is within the body of another loop of any type. The code in the following example uses two for loops to display sequential values from 00 through 99 where the outer loop controls the most significant digit and the inner loop controls the least significant digit. "Magic Numbers" are used only for illustration. Additional code may be added where desired for (int msd = e; msd

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

More Books

Students also viewed these Databases questions

Question

2. What are your challenges in the creative process?

Answered: 1 week ago