#!/usr/bin/perl use strict; use warnings; use Carp (); local $SIG{__WARN__} = \&Carp::cluck; # affiche le caractère $c sub afficheCaractere# char $c { } # affiche $n fois le caractère $c # ne revient pas à la ligne après. sub ligneSansReturn# int $n, int $c { } # affiche $n fois le caractère $c # revient à la ligne après. sub ligneAvecReturn# int $n, int $c { } # affiche n espaces, revient à la ligne après. sub nEspaces# int $n { } # affiche $c à la colonne $n, affiche des espaces avant. # ne revient pas à la ligne après # les indices commencent à 1. sub unCaractereSansReturn# int $n, int $c { } # affiche $c à la colonne $n, affiche des espaces avant. # revient à la ligne après sub unCaractereAvecReturn# int $n, int $c { } # affiche $c aux colonnes $i et $j # revient à la ligne après. sub deuxCaracteres# int $i, int $j, char $c { } # affiche un carré de coté $n. sub carre# int $n { } # affiche un chapeau dont la pointe (non affichée) # est sur la colonne $centre en utilisant des $c. sub chapeau# int $centre, char $c. { } # affiche un chapeau retourné dont la pointe (non affichée) # est sur la colonne $centre en utilisant des $c. sub chapeauInverse# int $centre, char $c. { } # affiche un losange de coté $n. sub losange# int $n { } # affiche un losange de coté $n. sub croix# int $n { } carre $ARGV[0]; losange $ARGV[0]; croix $ARGV[0];