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

  Expand the "currency conversion" program to include a menu

Expand the "Currency Conversion" program to include a menu that allows the user to choose which currency he/she wishes to display in its equivalency to the US dollar. - Correctly use at least 1 function or subroutine

  What is meant by value type and reference type objects

Explain what is meant by value type and reference type objects in C#. Explain the differences, providing an example of each. Write the code for an example of each. Develop your examples, instead of using examples from the textbook or the Internet

  Write a main function that reads pairs of positive integers

Prepare a function that has two positive integer parameters (say high and low) that returns the number of powers of two between (but not equal to) those parameters.

  Display the array, the average and the number of days above

Write a program that stores the daily temperatures for the month of April in an array name dailytemp. Calculate the average temperature for the month and the count the number of days that the daily temperature was above the average.

  Describe what an attribute or data member of a class

Analyze a basic set of requirements for a problem - Describe what an attribute or data member of a class - Distinguish between pass-by-value and pass-by-reference

  Series of arithmetic problems

This program will ask the user to answer a series of arithmetic problems and report on how the user performs. You will write this program in phases as specified below. Make sure that each phase works correctly and uses good style before progressin..

  Write a program that converts each name

You are given a file consisting of students? names in the following form: lastName, firstName middleName. (Note that a student may not have a middle name.) Write a program that converts each name to the following form: firstName middleName lastNam..

  Program that calculates how much a person earns in a month

Write a program that calculates how much a person earns in a month if the salary is one penny the first day, two pennies the second day, four pennies the third day,

  From the worker''s gross pay

An employee is paid at a rate of $16.78 per hour for the first 40 hours worked in a week. Any hours over the regular 40 hours are paid at the overtime rate of one-and-one-half times that. From the worker's gross pay

  Combination of memory technologies

Give an example of how an operating system may use a combination of memory technologies with varying speeds, capacities and costs to achieve overall good performance at acceptable cost.

  Reads numbers from input and prints them in reverse order

Write a C program that reads ten numbers from input and prints them in reverse order. We assume that the data consists of integers. The program should conform to the following format:

  Write a corresponding if else statement

The mathematical operation max(x,y,w,z) can be represented by using the conditional expression operator, as in:  max = (x > y && x > z && x > w) ? x : ((y > z && y > w) ? y : ((z > w) ? z : w))  Write a corresponding if else statement that is equival..

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