Computer Programming

posted by .

Hoe do I write a program to Create a C++ console application that uses cout to display a box of asterisks?

  • Computer Programming -

    A box of asterisks is displayed line by line.

    Try to draw a box of asterisks by hand to determine how you construct each line, i.e. how many asterisks followed by how many spaces, etc.

    Each line drawn correspond to a cout command. Now study the C++ language to see how asterisks can be displayed using the cout command, and construct each command individually.

    If you find duplications in the cout commands, you will have the opportunity to simplify your programme by looping structures (for, do...).

    Try to write the program and if it does not compile, or if it does not give what you want, post your programme for further help.

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. C++ Programming

    I NEED HELP WITH MY CODE!!! it won't compile right The formula for finding the force of gravity between two objects is Force = grav * (mass1 * mass2) / (radius * radius), where Force = the force of gravity between the two objects, …
  2. programming

    I am supposed to modify this program so it begins by asking the user for the number of values. The program then uses a loop to read the specified number of values and then display their average. program is below that i worked on in …
  3. Computer Information

    A __________ provides the tools that a programmer uses to create software. a)compiler b) interpreter c)code d)a programming language In a way, don't all of these help a programmer to create software?
  4. computer science

    in one the chapter 3 programming challenges you were asked to write a program that converts a celsius temperature to fahrenheit. Modify that program so it uses a loop to display a table of celsius from 0 to 20 and their Fahrenheit …
  5. computer science

    c++ program question write a program that uses a loop to display the characters for each ascii code 32 through 127. display 16 characters on each line with one space between characters in c++
  6. computer programming

    Write a program that simulates the dial of a phone number. The program will input a phone number and the program will acknowledge the call by either writing an error message or the 8 digit phone number to the console window. The phone …
  7. Computer

    Write the program that will calculate and display the career statistics for a hockey player. The program must be written in Visual Basic 2008 console application.
  8. Programming

    Write a pseudocode program that asks the user for an integer between 1 and 12. The program is to calculate the times table for that number. So for example, if the user enters a 2, then the program has to calculate 2x1 and display the …
  9. programming

    How to write a program to create a class roster using an array?
  10. Programming

    Write a program that would calculate and display the results for the multiplication table for values ranging from 1 to 100. Your program should print the output for each step and output a new line after 10 items. Provide your program …

More Similar Questions