-
Notifications
You must be signed in to change notification settings - Fork 0
/
test08-Priorité.txt
38 lines (30 loc) · 1.06 KB
/
test08-Priorité.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Fichier de test
# Test des priorités de calcul
# Les lignes de commentaires commencent par #
procedure principale()
i = 4*2 + 1; # i = 9
ecrire("On attend i = 9 on a : i = ",i);
i = 9 + 4*2 + 1; # i = 18 (9 + 8 + 1)
ecrire("On attend i = 18 on a : i = ",i);
i = 4*2 - 1; # i = 7
ecrire("On attend i = 7 on a : i = ",i);
j =3;
k = 2;
i = j==3 ou k==2 et j==8 ; # i = 1 car j=3
ecrire("On attend i = 1 on a : i = ",i);
j=3;
k=2;
i = j>k+2; # i = 0 car j=3 et k+2=4
ecrire("On attend i = 0 on a : i = ",i);
j=3;
k=4;
i = j>=k-1; # i = 1 car 3=4-1
ecrire("On attend i = 1 on a : i = ",i);
j=1;
h=2;
k=19;
r=5;
i = j<4-1 et k!=8+4*2-5 ou h>r*2 et r-5 == 0; # i = 1 car 1<3 et k!=11
ecrire("On attend i = 1 on a : i = ",i);
finproc
# Commentaire Final