compilation/examples/arithmetic.spf

32 lines
379 B
Plaintext
Raw Normal View History

2025-03-20 13:27:57 +01:00
# entier x = 3;
# entier y = 4;
#
liste l = [3, 4, 5];
ajouter 3 dans l;
afficher l;
2025-03-23 00:08:42 +01:00
entier x = 3;
entier y = 4;
entier z = x + 3 * y + 6 / 3;
2025-03-20 13:27:57 +01:00
#
# afficher x vaut y;
# afficher x ne vaut pas y;
# entier z;
# afficher taille "test";
# afficher x + 3, 3 + y;
# x = -x;
# afficher x;
2025-03-22 23:06:41 +01:00
# entier x = 2 + 3 * 4;
# entier y = 3 * 4 + 2;
2025-03-23 00:08:42 +01:00
# liste l = [1, 2, 3];
2025-03-22 23:06:41 +01:00
afficher l[2];