Write a program that displays the colored pyramid

Assignment Help C/C++ Programming
Reference no: EM131207961

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<windows.h>.
  • 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

Reference no: EM131207961

Questions Cloud

Compute unit conversion cost on cost of production report : Department W had 2,282 units, one-third completed at the beginning of the period, 13,357 units were transferred to Department X from Department W during the period, and 567 units were one-half completed at the end of the period. What is the equivalen..
What were total cost of units completed during the period : Department S had no work in process at the beginning of the period. 10,420 units of direct materials were added during the period at a cost of $72,940, 7,815 units were completed during the period, and 2,605 units were 32% completed as to labor and o..
Identify and briefly describe four trends in the macro : Identify and briefly describe four trends in the macro/marketing environment that will have or recently had an influence on the given industry
Prepare a post-closing trial balance as at 31 july 2016 : Determine the correct balances at 31 July for Merchandise inventory and Cost of goods sold under each of the following inventory methods: (a) FIFO, (b) LIFO and (c) weighted-average. (For the purposes of the question, please ignore GST).
Write a program that displays the colored pyramid : CMPS 151 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
Describe the components or subsytems of the system : Describe the components or subsytems of the system and what business function they address. Identify one vendor or open source solution for the system you chose to describe.
Mission and values of better world books : What are the mission and values of Better World Books? Critically evaluate their usefulness to the company's management in formulating strategy.
Crm help subaru conduct successful : As Marketing Manager for Subaru, respond to the following- "In what ways could CRM help Subaru conduct successful target marketing and positioning of their products?"
How performance is measured and interview an employee : Find out form senior managers how performance is measured and Interview an employee about the employee''s experience with the business'' performance management system.

Reviews

len1207961

9/15/2016 9:01:33 AM

In your program you should create 2 functions: One to draw a horizontal line at specific row, starting at a specific column, having a specific number of stars and with a specific color. And another one to draw a vertical line at specific column, starting at a specific row, having a specific number of stars and with a specific color. In your main function you should use the above 2 function to draw the pyramid.

Write a Review

C/C++ Programming Questions & Answers

  Write a program that ask a user to enter a list of names

Write a program that ask a user to enter a list of names. When you finish, The program will show the total number of characters in all the names.

  Use structures to create c program to compute student record

Explain the following and give their suitable syntax. A pointer. Use structures to create C program to compute and store student records of class.

  Define a static method samecolor in the car class

Write an abstract class Car to implement the Comparable interface. Write a Truck class and a Sedan class to implement Car. define a static method sameColor in the Car class to find out weather a Truck and a Sedan has the same color.

  Create author-filename

FILENAME: title of the source file,SPECIFICATION: description of the program

  Write a c program that recursively determines

Write a C program that recursively determines if a string is a palindrome. Before your program makes the palindrome determination, you must remove all punctuation characters from the string.

  Modify the code to change the variables

Quickly modify the code to change the variables if needed to the correct data type. Comment the code and indicate what the line or function performs

  An essential component of compromised to a resource

1. true or false? an essential component of compromised to a resource is that the situation resulting in the compromise was motivated by malice. A.true B.false

  Q1 write a program that generates the following

q1. write a program that generates the following outputnbspnbspnbspnbspnbspnbspnbspnbsp 10nbspnbspnbspnbspnbspnbspnbsp

  Write a random file

Write a program in C that write a random file (test write speed) then read that same file and calculate the speed of the write. (please DON'T use hdparm to test the read speed)

  Store user input - write c++ program

Write C++ program to provide the following functionality - Ask users to enter 10 integer numbers.

  Compare and contrast the mode operators ios

Compare and contrast the mode operators ios::in, ios::app, and ios::out. Provide a C++ code segment that illustrates the use of these mode operators.

  How do i take the location for the neighbour of each element

I have done the code the "wrapping of the matrix" via concatenation so I can count all the neighbours. Find highest score neighbor take location from S --> How do I take the location for the neighbour of each element? find strategy from A end.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd