title: How to print an inverted triangle?
body: <p>I am learning c++ programming these days hence I got myself a book to learn it. I have completed the Flow control chapter which describes the use of if else loops etc.
  I am stuck at this particular question:- </p>
  
  <p><code>Write a Program To print the following :-</code></p>
  
  <pre><code>@@@@@@@
   @@@@@
    @@@
     @
  </code></pre>
  
  <p>How can I accomplish this using only loops and if else statements in c++.</p>
  
  <p>I figured out that in every row there are two less @'s and one more space.</p>
  
  <p>I have also programmed for the repeating @'s but  I am unable to insert the spaces. Here's my program for @'s:- </p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main() {
      int i,j,k;
      for (i = 7; i &gt; 0; i = i - 2) {
  
          for (j = 1; j &lt;= i; ++j) {
  
              cout &lt;&lt; "@" &lt;&lt; " ";
          }
          cout &lt;&lt; endl;
      }
      return 0;
  }
  </code></pre>