Print an ASCII art diamond
<p>This is a homework question I got for my programming course at school, and I'm kind of lost, so please help. Here is the question:</p>

<blockquote>
  <p>Write an application program that
  prints a diamond of asterisks (*) on
  the screen.  The number of lines in
  the diamond is given by the user.  As
  an example, if the user requested a
  diamond with 7 lines, the following
  would be displayed.</p>
</blockquote>

<p>Here is what I have so far:</p>

<pre><code>{
  int nlines;
  int nsp;
  cout &lt;&lt; "enter the number of lines (must be more then one)" &lt;&lt; endl;
  cin &gt;&gt; nlines;
  while((nlines)&lt;=0)
  {
    cout &lt;&lt; "enter the number of lines (must be more then one)" &lt;&lt; endl;
    cin &gt;&gt; nlines;
  }
  nsp=(nlines - 1)/2;
  for(int currspace = 1; currspace &lt;= nsp; currspace++)
  {
    cout &lt;&lt; " ";
  }
  cout &lt;&lt; "*" &lt;&lt; endl;
  for( int currentline = 0; currentline &lt; nlines; currentline++)
  {
    for( int currentaster = 0; currentaster &lt;= currentline; currentaster++)
      cout &lt;&lt; "*";
    cout &lt;&lt; endl;
  }
  return 0;
</code></pre>
