programmingChallenges/sapin/README.md

159 lines
8.3 KiB
Markdown
Raw Normal View History

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 :
$> /u/all/astek/public/sapin 1
*
***
*****
*******
|
$>
Voici un sapin de 5 :
$> /u/all/astek/public/sapin 5
*
***
*****
*******
*****
*******
*********
***********
*************
***********
*************
***************
*****************
*******************
*********************
*****************
*******************
*********************
***********************
*************************
***************************
*****************************
*************************
***************************
*****************************
*******************************
*********************************
***********************************
*************************************
***************************************
|||||
|||||
|||||
|||||
|||||
$>
Voici un sapin de 10 :
$> /u/all/astek/public/sapin 10
*
***
*****
*******
*****
*******
*********
***********
*************
***********
*************
***************
*****************
*******************
*********************
*****************
*******************
*********************
***********************
*************************
***************************
*****************************
*************************
***************************
*****************************
*******************************
*********************************
***********************************
*************************************
***************************************
*********************************
***********************************
*************************************
***************************************
*****************************************
*******************************************
*********************************************
***********************************************
*************************************************
*******************************************
*********************************************
***********************************************
*************************************************
***************************************************
*****************************************************
*******************************************************
*********************************************************
***********************************************************
*************************************************************
*****************************************************
*******************************************************
*********************************************************
***********************************************************
*************************************************************
***************************************************************
*****************************************************************
*******************************************************************
*********************************************************************
***********************************************************************
*************************************************************************
*****************************************************************
*******************************************************************
*********************************************************************
***********************************************************************
*************************************************************************
***************************************************************************
*****************************************************************************
*******************************************************************************
*********************************************************************************
***********************************************************************************
*************************************************************************************
***************************************************************************************
*****************************************************************************
*******************************************************************************
*********************************************************************************
***********************************************************************************
*************************************************************************************
***************************************************************************************
*****************************************************************************************
*******************************************************************************************
*********************************************************************************************
***********************************************************************************************
*************************************************************************************************
***************************************************************************************************
*****************************************************************************************************
|||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||
$>