Différences entre versions de « Php algo td1 »

De The Linux Craftsman
Aller à la navigation Aller à la recherche
Ligne 185 : Ligne 185 :
  
 
function main($argv) {
 
function main($argv) {
* Récupération du mot a coder */
+
/* Récupération du mot a coder */
 
if (sizeof ( $argv ) == 1) {
 
if (sizeof ( $argv ) == 1) {
 
echo "Spécifier un mot en paramètre !";
 
echo "Spécifier un mot en paramètre !";

Version du 19 mars 2014 à 09:25

Sujet

Sujet_TD1.pdf

Partie A

Exercice 1


Exercice 2


Exercice 3

Partie B

Exercice 4


Exercice 5


Exercice 6


Exercice 7

Exécution

# php -f TD1.php AMI
Transformation du mot en chiffre :
Array
(
    [0] => 0
    [1] => 12
    [2] => 8
)
Application de la fonction affine :
Array
(
    [0] => 3
    [1] => 1
    [2] => 19
)
Mot codé :
Array
(
    [0] => D
    [1] => B
    [2] => T
)