You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

165 lines
8.2 KiB
Markdown

9 years ago
# sapin
## rules
9 years ago
Écrire une fonction qui affiche un sapin a l'écran en fonction d'une taille donnée.
Un sapin de 0, n'affiche rien.
9 years ago
9 years ago
```console
9 years ago
$> sapin 1
9 years ago
*
***
*****
*******
|
9 years ago
$> sapin 5
9 years ago
*
***
*****
*******
*****
*******
*********
***********
*************
***********
*************
***************
*****************
*******************
*********************
*****************
*******************
*********************
***********************
*************************
***************************
*****************************
*************************
***************************
*****************************
*******************************
*********************************
***********************************
*************************************
***************************************
|||||
|||||
|||||
|||||
|||||
9 years ago
$> sapin 10
9 years ago
*
***
*****
*******
*****
*******
*********
***********
*************
***********
*************
***************
*****************
*******************
*********************
*****************
*******************
*********************
***********************
*************************
***************************
*****************************
*************************
***************************
*****************************
*******************************
*********************************
***********************************
*************************************
***************************************
*********************************
***********************************
*************************************
***************************************
*****************************************
*******************************************
*********************************************
***********************************************
*************************************************
*******************************************
*********************************************
***********************************************
*************************************************
***************************************************
*****************************************************
*******************************************************
*********************************************************
***********************************************************
*************************************************************
*****************************************************
*******************************************************
*********************************************************
***********************************************************
*************************************************************
***************************************************************
*****************************************************************
*******************************************************************
*********************************************************************
***********************************************************************
*************************************************************************
*****************************************************************
*******************************************************************
*********************************************************************
***********************************************************************
*************************************************************************
***************************************************************************
*****************************************************************************
*******************************************************************************
*********************************************************************************
***********************************************************************************
*************************************************************************************
***************************************************************************************
*****************************************************************************
*******************************************************************************
*********************************************************************************
***********************************************************************************
*************************************************************************************
***************************************************************************************
*****************************************************************************************
*******************************************************************************************
*********************************************************************************************
***********************************************************************************************
*************************************************************************************************
***************************************************************************************************
*****************************************************************************************************
|||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||
$>
9 years ago
```
9 years ago
## Author
moul
## Winners
### Speed
1. khajidu
2. kobajaski
3. gnieark
4. zigazou
5. moebiuseye
moul is off-side for the speed challenge