1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Firlakuza [10]
3 years ago
8

Write a C++ program which displays the following shape. Please help me out with it.

Computers and Technology
1 answer:
Korvikt [17]3 years ago
3 0

Answer:

/*

Notably, this leaves a blank line at the top, so if that shouldn't be there you can tweak it.

This was built successfully with gcc

gcc -Wall shape.cpp -lstdc++

*/

#include <iostream>

using namespace std;

int main(void){

   int w, x;

   for(w = 0; w < 16; w += 2){

       for(x = 0; x < w >> 1; x++){

           cout << "*";

       }      

       for(x = w; x < 14; x++){

           cout << " ";

       }      

       for(x = 0; x < w >> 1; x++){

           cout << "*";

       }      

       cout << endl;

   }  

   return 1;

}

You might be interested in
What effect would excluding quotation marks from a search phrase have?
n200080 [17]

Answer: C

 it would broaden the search

Explanation:

Placing quotation marks around a search term or phrase limits your search to that exact term or phrase. Without the quotes, your search engine may return all results that contain each separate word. Placing AND between your keywords will return results that only include both or all your keywords.

4 0
2 years ago
_____ lets you look at two documents at the same time.
jasenka [17]
B. Side by side view
6 0
3 years ago
What does a wholesaler do?
Svetach [21]
Wholesalers acquire goods from manufacturers, farmers or miners, holds them then distributes them to retailers.
6 0
3 years ago
What is meaning of reboot
TEA [102]
I believe to reboot is to reset. Its the act of resetting, or starting up a computer again.
4 0
3 years ago
Read 2 more answers
Consider the following instructions for a game element: Move Forward If not at end, move forward Else stop This is an example of
xz_007 [3.2K]

Answer:

C.

Explanation:

8 0
3 years ago
Other questions:
  • Which of the following best explains why some people invest their saving in the stock market and others put their saving in bank
    5·2 answers
  • For a project called "The Sheep Market", Aaron Koblin collected drawings of sheep from strangers on the Internet. He posted the
    14·1 answer
  • in java how do i Write a program that reads a set of integers, and then prints the sum of the even and odd integers.
    6·1 answer
  • Which is technologically backward country? Options United States U K CHILE INDIA
    14·1 answer
  • Which devices typically generate computer output? monitor, printer, speaker, projector, keyboard mouse, printer, speaker, projec
    7·1 answer
  • What do computer programs generally try to solve and how? A) Computer programs generally try to solve a well-defined problem usi
    14·1 answer
  • HELLO <br> any edmentum people out there.
    15·2 answers
  • A multinational organization that offers web-based services has datacenters that are located only in the United State; however,
    6·1 answer
  • You have been asked to advise a group of several universities who want to combine research efforts and store data in the cloud.
    9·1 answer
  • a value-returning method must specify as its return type in the method header. question 18 options: a) an int b) a double c) a b
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!