Answer :

jacobEwing

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;

}

Other Questions