Adding most operators
This commit is contained in:
17
examples/arithmetic.spf
Normal file
17
examples/arithmetic.spf
Normal file
@ -0,0 +1,17 @@
|
||||
# entier x = 3;
|
||||
# entier y = 4;
|
||||
#
|
||||
liste l = [3, 4, 5];
|
||||
|
||||
ajouter 3 dans l;
|
||||
|
||||
afficher l;
|
||||
|
||||
#
|
||||
# afficher x vaut y;
|
||||
# afficher x ne vaut pas y;
|
||||
# entier z;
|
||||
# afficher taille "test";
|
||||
# afficher x + 3, 3 + y;
|
||||
# x = -x;
|
||||
# afficher x;
|
@ -7,4 +7,4 @@ tant que nombre > 0 faire {
|
||||
nombre = nombre - 1;
|
||||
}
|
||||
|
||||
afficher "La factorielle vaut", factorielle;
|
||||
afficher "La factorielle vaut", factorielle;
|
||||
|
@ -9,7 +9,7 @@ majeur = faux;
|
||||
afficher nom, age, majeur;
|
||||
|
||||
|
||||
#TODO: Ces lignes devraient donner une erreur
|
||||
#Ces lignes devraient donner une erreur
|
||||
# majeur = 42;
|
||||
|
||||
# afficher majeur;
|
||||
|
Reference in New Issue
Block a user