Cmps 151 programming assignment in this assignment you are


Programming Assignment-

In this assignment you are requested to write a C++ program that displays the following colored pyramid on the screen:

- The pyramid is 71 characters wide and 21 characters high.

- To draw it, you need to draw green horizontal lines, then red and blue vertical lines.

- Used the following clarifications to write your program:

  • The output screen can be thought of as a grid of 25 rows and 80 columns. Row 0 is at the up edge of the screen. Column 0 is at the left edge of the screen.
  • The intersection of a row and a column is a cell. A cell can display a single character.
  • A cell is identified by its row and column numbers. These are its coordinates. To be able to write starting from a specific position on the screen you have to include - #include.
  • You have also to create a handle (an identifier) to reference the output screen: HANDLE screen = GetStdHandle(STD_OUTPUT_HANDLE);

- As an illustration, the following program draws the function y=x on the screen using the character '*'

Attachment:- Assignment.rar

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Cmps 151 programming assignment in this assignment you are
Reference No:- TGS01591707

Expected delivery within 24 Hours