title: draw X letter shape using asterisk(*)
body: <p>i want to write a program to draw the shape of X letter using asterisk(*)</p>
  
  <pre><code>#include "stdafx.h"
  #include &lt;iostream&gt;
  using namespace std;
  int main(int argc, char* argv[]){
    int i, j;
  
    for(i = 1; i &lt;= 9; i++){
      for(j = 1; j &lt;= 12; j++){
        if(i == j){
          cout &lt;&lt; "***";
        }else{
          cout &lt;&lt; " ";
        }
      }
      cout&lt;&lt; endl;
    }
  
    return 0;
  }
  </code></pre>
  
  <p>i am very new to programming</p>
  
  <p>i only made (\) how can I make the whole X</p>
  
  <pre><code>***------***
  -***----***-
  --***--***--
  ---******---
  --***--***--
  -***----***-
  ***------***  
  </code></pre>
  
  <p>that's what i did uptill now</p>
  
  <pre><code>include "stdafx.h"
  #include &lt;iostream&gt;
  using namespace std;
  int main(int argc, char* argv[])
  {
  int i, d, a=1,b=12,c;
  for(i = 1; i &lt;= 6; i++)
  {
  for (d=1; d&lt;i;d++)  {cout &lt;&lt;" ";}
  cout&lt;&lt;"***";
  for (c=a+1; c&lt;b;c++) {cout &lt;&lt;" ";}
  {cout&lt;&lt;"***";}
  for(b=12-i;b&lt;i;b++) 
  {cout&lt;&lt;"***";}
  cout&lt;&lt;endl;
  a++;
  }
  return 0;
  }       
  </code></pre>
  
  <p>i divided the top of the (\//) to three parts 
  [space][<em>][space][</em>]</p>