Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program in C++ that produces the following output (user inputs are in bold ) [ cs__1-3-]$ ./a.out Enter symbol: $ Draw 1 symbol:

Write a program in C++ that produces the following output (user inputs are in bold)

[ cs__1-3-]$ ./a.out Enter symbol: $ Draw 1 symbol: $ Draw 10 symbol: $$$$$$$$$$ Draw X symbol: Enter line length: 20 $$$$$$$$$$$$$$$$$$$$ Draw X symbol twice: $$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$ Draw X symbol Y times: Enter height: 12 $$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$ Draw X symbol Y times with a differnt beginning, 'A ': A $$$$$$$$$$$$$$$$$$$$ A $$$$$$$$$$$$$$$$$$$$ A $$$$$$$$$$$$$$$$$$$$ A $$$$$$$$$$$$$$$$$$$$ A $$$$$$$$$$$$$$$$$$$$ A $$$$$$$$$$$$$$$$$$$$ A $$$$$$$$$$$$$$$$$$$$ A $$$$$$$$$$$$$$$$$$$$ A $$$$$$$$$$$$$$$$$$$$ A $$$$$$$$$$$$$$$$$$$$ A $$$$$$$$$$$$$$$$$$$$ A $$$$$$$$$$$$$$$$$$$$ Draw X symbol Y times with line numbers: 11 $$$$$$$$$$$$$$$$$$$$ 10 $$$$$$$$$$$$$$$$$$$$ 9 $$$$$$$$$$$$$$$$$$$$ 8 $$$$$$$$$$$$$$$$$$$$ 7 $$$$$$$$$$$$$$$$$$$$ 6 $$$$$$$$$$$$$$$$$$$$ 5 $$$$$$$$$$$$$$$$$$$$ 4 $$$$$$$$$$$$$$$$$$$$ 3 $$$$$$$$$$$$$$$$$$$$ 2 $$$$$$$$$$$$$$$$$$$$ 1 $$$$$$$$$$$$$$$$$$$$ 0 $$$$$$$$$$$$$$$$$$$$ Make length depend on line number: 11 $$$$$$$$$$$ 10 $$$$$$$$$$ 9 $$$$$$$$$ 8 $$$$$$$$ 7 $$$$$$$ 6 $$$$$$ 5 $$$$$ 4 $$$$ 3 $$$ 2 $$ 1 $ 0 Reverse the triangle: 12 11 $ 10 $$ 9 $$$ 8 $$$$ 7 $$$$$ 6 $$$$$$ 5 $$$$$$$ 4 $$$$$$$$ 3 $$$$$$$$$ 2 $$$$$$$$$$ 1 $$$$$$$$$$$ Add a 2nd shape: 12 ############ 11 ############$ 10 ############$$ 9 ############$$$ 8 ############$$$$ 7 ############$$$$$ 6 ############$$$$$$ 5 ############$$$$$$$ 4 ############$$$$$$$$ 3 ############$$$$$$$$$ 2 ############$$$$$$$$$$ 1 ############$$$$$$$$$$$ Swap the triangle and the square: 11 $############ 10 $$############ 9 $$$############ 8 $$$$############ 7 $$$$$############ 6 $$$$$$############ 5 $$$$$$$############ 4 $$$$$$$$############ 3 $$$$$$$$$############ 2 $$$$$$$$$$############ 1 $$$$$$$$$$$############ 0 $$$$$$$$$$$$############ Change the symbol to a ' ' (space): 11 ############ 10 ############ 9 ############ 8 ############ 7 ############ 6 ############ 5 ############ 4 ############ 3 ############ 2 ############ 1 ############ 0 ############ 

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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Sham Navathe

4th Edition

0321122267, 978-0321122261

More Books

Students also viewed these Databases questions