programmingChallenges/sapin/README.md

185 lines
8.5 KiB
Markdown
Raw Normal View History

2015-10-25 00:09:34 +02:00
# sapin
## rules
2015-10-19 20:27:53 +02:00
Écrire une fonction qui affiche un sapin a l'écran en fonction
d'une taille donnée. un sapin de 0, n'affiche rien.
votre fonction devra etre prototypee comme suit:
void sapin(int taille);
Fonction(s) autorisee(s): printchar
Voici un sapin de 1 :
2015-10-19 20:26:42 +02:00
```console
2015-10-19 20:27:53 +02:00
$> /u/all/astek/public/sapin 1
*
***
*****
*******
|
$>
2015-10-19 20:26:42 +02:00
```
2015-10-19 20:27:53 +02:00
Voici un sapin de 5 :
2015-10-19 20:26:42 +02:00
```console
2015-10-19 20:27:53 +02:00
$> /u/all/astek/public/sapin 5
*
***
*****
*******
*****
*******
*********
***********
*************
***********
*************
***************
*****************
*******************
*********************
*****************
*******************
*********************
***********************
*************************
***************************
*****************************
*************************
***************************
*****************************
*******************************
*********************************
***********************************
*************************************
***************************************
|||||
|||||
|||||
|||||
|||||
$>
2015-10-19 20:26:42 +02:00
```
2015-10-19 20:27:53 +02:00
Voici un sapin de 10 :
2015-10-19 20:26:42 +02:00
```
2015-10-19 20:27:53 +02:00
$> /u/all/astek/public/sapin 10
*
***
*****
*******
*****
*******
*********
***********
*************
***********
*************
***************
*****************
*******************
*********************
*****************
*******************
*********************
***********************
*************************
***************************
*****************************
*************************
***************************
*****************************
*******************************
*********************************
***********************************
*************************************
***************************************
*********************************
***********************************
*************************************
***************************************
*****************************************
*******************************************
*********************************************
***********************************************
*************************************************
*******************************************
*********************************************
***********************************************
*************************************************
***************************************************
*****************************************************
*******************************************************
*********************************************************
***********************************************************
*************************************************************
*****************************************************
*******************************************************
*********************************************************
***********************************************************
*************************************************************
***************************************************************
*****************************************************************
*******************************************************************
*********************************************************************
***********************************************************************
*************************************************************************
*****************************************************************
*******************************************************************
*********************************************************************
***********************************************************************
*************************************************************************
***************************************************************************
*****************************************************************************
*******************************************************************************
*********************************************************************************
***********************************************************************************
*************************************************************************************
***************************************************************************************
*****************************************************************************
*******************************************************************************
*********************************************************************************
***********************************************************************************
*************************************************************************************
***************************************************************************************
*****************************************************************************************
*******************************************************************************************
*********************************************************************************************
***********************************************************************************************
*************************************************************************************************
***************************************************************************************************
*****************************************************************************************************
|||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||
$>
2015-10-19 20:26:42 +02:00
```
2015-10-25 00:09:34 +02:00
## Author
moul
## Winners
### Speed
1. khajidu
2. kobajaski
3. gnieark
4. zigazou
5. moebiuseye
moul is off-side for the speed challenge