_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › 螳讌覲覈
//願碓 豺蟲 觸襴  襭襯 譴蟆...
//蟆襷 る 襭  危企   蟆..
//螳  蟆 蟯 豈 谿瑚蠍 覦...

#include <iostream.h>
#include <conio.h>
//#include <stdio.h>



/*
void printStar(int stars)
{
     for(int i=0; i<stars; i++)
          putch('*');
}

void printSpace(int spaces)
{
     for(int i=0; i<spaces; i++)
          putch(' ');
}

int main()
{
     const int max = 15;                            // *
     int spaces;	                                  // **
     for(int i=0,stars=1; i<max; i++,stars++)       // ***
     {                                              // ****
          spaces=max-stars;	                         // *****
          printStar(stars);                         // ******
          putch('\n');                              // *******
     }                                              // ********
     return 0;                                      // *********
}
*/

/*
void printStar(int stars)
{
     for(int i=0; i<stars; i++)
          putch('*');
}

void printSpace(int spaces)
{
     for(int i=0; i<spaces; i++)
          putch(' ');
}

int main()
{
     const int max=15;                               // *********
     int stars;                                      // ********
                                                     // *******
     for(int i=0,spaces=0; i<max; i++,spaces++)      // ******
     {                                               // *****
          stars=max-spaces;	                          // ****
          printSpace(spaces);                        // ***
          printStar(stars);                          // **
          putch('\n');                               // *
	}
	return 0;
}	
*/

/*
void printStar(int stars)
{
     for(int i=0; i<stars; i++)
          putch('*');
}

void printSpace(int spaces)
{
     for(int i=0; i<spaces; i++)
          putch(' ');
}
  
int main()
{
     const int max=15;                               //         *
     int spaces;                                     //        **
     for(int i=0,stars=1; i<max; i++,stars++)        //       ***
     {                                               //      ****
          spaces=max-stars;                          //     *****
          printSpace(spaces);                        //    ******
          printStar(stars);                          //   *******
          putch('\n');                               //  ********
     }                                               // *********
	return 0;
}
*/

/*
void printStar(int stars)
{
     for(int i=0; i<stars; i++)
          putch('*');
}

void printSpace(int spaces)
{
     for(int i=0; i<spaces; i++)
          putch(' ');
}
  
int main()
{
     const int max=15;                                // *********
     int stars;                                       //  ********
                                                      //   *******
     for(int i=0,spaces=0; i<max; i++,spaces++)       //    ******
     {                                                //     *****
          stars=max-spaces;	                          //      ****
          printSpace(spaces);                         //       ***
          printStar(stars);                           //        **
          putch('\n');                                //         *
	}
	return 0;
}
*/

/*
void printStar(int stars)
{
     for(int i=0; i<stars; i++)
          putch('*');
}

void printSpace(int spaces)
{
     for(int i=0; i<spaces; i++)
         putch(' ');
}
  
int main()
{
     const int max=15;                           //     *    
                                                 //    ***
     int stars=1;	                              //   *****  
     int spaces;                                 //  *******
                                                 // *********	
     for(int i=0; i<max; i++)                    //  *******
     {                                           //   *****
         spaces=(max-stars)/2;                   //    ***
         printSpace(spaces);                     //     *
      	printStar(stars);					
         if(i<max/2)
             stars+=2;
         else
             stars-=2;
         putch('\n');
     }
     return 0;
}
*/


/*
void printStar(int stars)
{
     for(int i=0; i<stars; i++)
          putch('*');
}

void printSpace(int spaces)
{
     for(int i=0; i<spaces; i++)
          putch(' ');
}
  
int main()
{
     const int max=15;                       // *********    
     int spaces;                             //  *******
     int stars=max;                          //   *****
                                             //    ***
     for(int i=0; i<max; i++)                //     *
     {                                       //    ***
         spaces=(max-stars)/2;               //   *****
         printSpace(spaces);                 //  *******
         printStar(stars);                   // *********
         if(i>=max/2)
             stars+=2;
         else
             stars-=2;
         if(stars<1) stars=3;
         putch('\n');
     }
     return 0;
}

*/

/*
void printStar(int stars)
{
     for(int i=0; i<stars; i++)
          putch('*');
}

void printSpace(int spaces)
{
     for(int i=0; i<spaces; i++)
          putch(' ');
}
  
int main()
{
     const int max=15;                     //         *    
     int spaces;                           //       ***
     int stars=1;                          //     *****
                                           //   *******
     for(int i=0; i<max; i++)              // *********
     {                                     //   *******
         spaces=max-stars;                 //     *****
         printSpace(spaces);               //       ***
         printStar(stars);                 //         *
         if(i>=max/2)
             stars-=2;
         	else
             stars+=2;
         	putch('\n');
     }
     return 0;
}
*/


/*
void printStar(int stars)
{
     for(int i=0; i<stars; i++)
          putch('*');
}

void printSpace(int spaces)
{
     for(int i=0; i<spaces; i++)
          putch(' ');
}
  
int main()
{
     const int max=15;                        // *
     int spaces;                              // ***
     int stars=1;                             // *****
                                              // *******
     for(int i=0; i<max; i++)                 // *********
     {                                        // *******
         spaces=max-stars;                    // *****
         printStar(stars);                    // ***
         printSpace(spaces);                  // *
         if(i>=max/2)
               stars-=2;
         	else
               stars+=2;
         	putch('\n');
     }
     return 0;
}
*/

/*
void printStar(int stars)
{
     for(int i=0; i<stars; i++)
          putch('*');
}

void printSpace(int spaces)
{
     for(int i=0; i<spaces; i++)
          putch(' ');
}
  
int main()
{
     const int max=15;                       //     *    
     int spaces=max/2;                       //    **
     int stars=1;                            //    ***
                                             //   ****
     for(int i=0; i<max; i++)                //   *****
     {                                       //  ******
          printSpace(spaces);                //  *******
          printStar(stars);	                  // ********
                                             // *********
          if(i%2)
               spaces--;
          stars++;
          putch('\n');
     }
     return 0;
}
*/


void printStar(int stars)
{
    for(int i=0; i<stars; i++)
        putch('*');
}

void printSpace(int spaces)
{
     for(int i=0; i<spaces; i++)
         putch(' ');
}
  
int main()
{
     const int max=15;                          // *********    
     int spaces=max/2;                          // ********
     int stars=max;                             //  *******
                                                //  ******
     for(int i=0; i<max; i++)                   //   *****
     {                                          //   ****
         printSpace(spaces);                    //    ***
         printStar(stars);                      //    **
                                                //     *
         if(i%2)
             spaces++;
         stars--;
         putch('\n');
     }
     return 0;
}

蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2018-04-13 23:12:53

螻 覓願 蟆 譴 襯 朱 蟆企. (W.)