#include<iostream>
#include<windows.h>
#include<string>
using namespace std;
void main()
{
    HANDLE consolehwnd;
consolehwnd = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(consolehwnd,12);
    const int n=12,m=40;
      string a[n][m];
      for(int i=0;i<n;i++)
      {
          for(int j=0;j<m;j++)
          {
              a[i][j]=" ";
          }
      }
      //
    
              int c=8;
            while(c<13)
        {
                a[0][c]="●";
                    c++;
         }
             int i=1;
                     for(int w=7,v=6;i<4;i++,w--,v++)
                     {
                         for(int j=0;j<v;j++)
                         {
                          a[i][w+j]="●";
                         }
                         
                     }
                       
                 
                    
                       
                     for(int v=13,w=0;i<12;i++)
                     {
                             
                         for(int j=5;j<v;j++)
                         {
                             
                          a[i][j+w]="●";
                             
                         }
                         w+=2;
                         v--;
                     }
                      
                     
                                            
   for(int i=0;i<n;i++)
      {
          for(int j=0;j<m;j++)
          {
              cout<<a[i][j];
             
          }
           cout<<endl;
   }
    
    
                    
             
    
    
}
  /*
    ●●●●●
     
       ●●●●●●
      ●●●●●●●
     ●●●●●●●●
      ●●●●●●●●
        ●●●●●●●
          ●●●●●●
            ●●●●●
              ●●●●
                ●●●
                  ●●
                    ●
*/
     // 这是半个爱心,发现用cout语句要比for循环方便许多....
[
 本帖最后由 xg5699 于 2011-8-10 13:35 编辑 ]