Université de Mostaganem Abdelhamid IBn Badis La faculté des sciences et de la
Université de Mostaganem Abdelhamid IBn Badis La faculté des sciences et de la technologie 1ère année LMD ST 2016/2017 Module: Informatique I 1 Corrigé de l’examen de fin de semestre 1 Exercice 1 (6 pts) (54,125)10=(312,02)4 Justification 54 4 0.5pt 2 13 4 1 3 4 3 0 0.125*4=0.5 0.5pt 0.5*4=2 (124)6=( 1221)3 Justification (124)6=4*60+2*61+1*62=4+12+36=(52)10 0.5pt 52 3 0.5pt 1 17 3 2 5 3 2 1 3 1 0 (A1F,DC)16=( 2591,8164)10 Justification (A1F,DC)16=12*16-2+13*16-1+15*160+1*161+10*162 =0.0039+0.8125+15+16+2560 1pt =2591,8164 (102221110202,121222)3=(387422,558)9 Justification B=9 B=3 1 pt 0 0 0 1 0 1 2 0 2 3 1 0 4 1 1 5 1 2 6 2 0 7 2 1 8 2 2 (10 22 21 11 02 02,12 12 22)3=(387422,558)9 1pt (9875)12 > (BAA)12> (AA3)12> (A9A)12 Justification 1pt (9875)12, (A9A)12, (BAA)12, (AA3)12 (9875)12 le plus grand car le chiffre de poids fort a une puissance =3 (tous les autres nombres ont la puissance du un chiffre du poids fort=2) En base 12, B>A donc (BAA)12> (A9A)12 et (BAA)12>(AA3)12 (AA3)12 et (A9A)12 ont le même symbole du poids fort mais (AA3)12> (A9A)12 car A>9 Donc le tri décroissant est : (9875)12 > (BAA)12> (AA3)12> (A9A)12 Université de Mostaganem Abdelhamid IBn Badis La faculté des sciences et de la technologie 1ère année LMD ST 2016/2017 Module: Informatique I 2 Exercice2 (8 pts) a b c d 1 2 4 1 0.5pt Donner deux nombres entiers 1 2 4 Le résultat=1 0.5pt a b c d 4 2 0 0 0.5pt Donner deux nombres entiers 4 2 0 Le résultat=0 0.5pt a b c d 2 -1 4 -1 0.5pt Donner deux nombres entiers 2 -1 4 Le résultat=-1 0.5pt L’algorithme détermine et affiche le minimum des trois nombres 0.5 pt Program ex1 ; 0.25 pt Var 0.25 pt a, b, c , d: integer ; 0.25 pt Begin 0.25 pt Write(‘ Donner trois nombres entiers’) ; 0.25 pt read(a,b,c) ; 0.25 pt if (a<b) then 0.25 pt if (a<c) then 0.25 pt d :=a 0.25 pt Else 0.25 pt d :=c 0.25 pt Else 0.25 pt if (b<c) then 0.25 pt d :=b 0.25 pt Else 0.25 pt d :=c ; 0.25 pt write (‘Le résultat=’, d) ; 0.25 pt end. 0.25 pt Université de Mostaganem Abdelhamid IBn Badis La faculté des sciences et de la technologie 1ère année LMD ST 2016/2017 Module: Informatique I 3 Exercice 3 (3.5 pts) Program ex3 ; Var a, b, c : integer ; 0.5 pt Begin write(‘Donner deux nombres entiers’); 0.5 pt read(a,b) ; 0.5 pt if (a=b) then 0.5 pt c:=0 Else 0.5 pt if(a>b) then c:=a-b Else 0.5 pt c:=b-a; write(‘c=’,c); 0.5 pt end. Exercice 4 (2.5 pts) Program ex4 ; Var t : real ; 0.5pt begin write(‘Donner la température de l’’eau’) ; 0.5pt read(t) ; if (t<=0) then 0.5pt write(‘Glace’) else 0.5pt if (t<100) then wirte(‘Liquide’) else 0.5pt write(‘Vapeur’); end. uploads/Science et Technologie/ corrige-proposition-exam1.pdf
Documents similaires










-
29
-
0
-
0
Licence et utilisation
Gratuit pour un usage personnel Attribution requise- Détails
- Publié le Oct 04, 2021
- Catégorie Science & technolo...
- Langue French
- Taille du fichier 0.0459MB