[ create a new paste ] login | about

Link: http://codepad.org/mtN6TwUy    [ raw code | output | fork ]

C++, pasted on Dec 28:
1
2
3
4
5
6
7
8
9
10
11
12
int main()
{
int n = 60;
for(int i=0; i<=(n%2?n*2-1:n*2); i++)
{
  for(int j=0; j<(i - i/(n+1) * ((i - n)*2)); j++)
  {
    cout << "*";
  }
  cout << endl;
}
}


Output:

*
**
***
****
*****
******
*******
********
*********
**********
***********
************
*************
**************
***************
****************
*****************
******************
*******************
********************
*********************
**********************
***********************
************************
*************************
**************************
***************************
****************************
*****************************
******************************
*******************************
********************************
*********************************
**********************************
***********************************
************************************
*************************************
**************************************
***************************************
****************************************
*****************************************
******************************************
*******************************************
********************************************
*********************************************
**********************************************
***********************************************
************************************************
*************************************************
**************************************************
***************************************************
****************************************************
*****************************************************
******************************************************
*******************************************************
********************************************************
*********************************************************
**********************************************************
***********************************************************
************************************************************
***********************************************************
**********************************************************
*********************************************************
********************************************************
*******************************************************
******************************************************
*****************************************************
****************************************************
***************************************************
**************************************************
*************************************************
************************************************
***********************************************
**********************************************
*********************************************
********************************************
*******************************************
******************************************
*****************************************
****************************************
***************************************
**************************************
*************************************
************************************
***********************************
**********************************
*********************************
********************************
*******************************
******************************
*****************************
****************************
***************************
**************************
*************************
************************
***********************
**********************
*********************
********************
*******************
******************
*****************
****************
***************
**************
*************
************
***********
**********
*********
********
*******
******
*****
****
***
**
*



Create a new paste based on this one


Comments: