8.3 KiB
É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 * *** ***** ******* ***** ******* ********* *********** ************* *********** ************* *************** ***************** ******************* ********************* ***************** ******************* ********************* *********************** ************************* *************************** ***************************** ************************* *************************** ***************************** ******************************* ********************************* *********************************** ************************************* *************************************** ********************************* *********************************** ************************************* *************************************** ***************************************** ******************************************* ********************************************* *********************************************** ************************************************* ******************************************* ********************************************* *********************************************** ************************************************* *************************************************** ***************************************************** ******************************************************* ********************************************************* *********************************************************** ************************************************************* ***************************************************** ******************************************************* ********************************************************* *********************************************************** ************************************************************* *************************************************************** ***************************************************************** ******************************************************************* ********************************************************************* *********************************************************************** ************************************************************************* ***************************************************************** ******************************************************************* ********************************************************************* *********************************************************************** ************************************************************************* *************************************************************************** ***************************************************************************** ******************************************************************************* ********************************************************************************* *********************************************************************************** ************************************************************************************* *************************************************************************************** ***************************************************************************** ******************************************************************************* ********************************************************************************* *********************************************************************************** ************************************************************************************* *************************************************************************************** ***************************************************************************************** ******************************************************************************************* *********************************************************************************************
|||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||
|||||||||||
$>