Académique Documents
Professionnel Documents
Culture Documents
Bac 2012
Bac 2012
Exercice 1 :
1) X = 11
Y = 12
2) N = 138.25 , E = 0
3) Ch = ''138.25''
4) Ch1 =''inion''
5) Ch1 =''information '' , Ch2 = '' format ''
Exercice 2 :
1) j1
S1
Répéter
j j+2
s s+(1/fact(j))
jusqu’à ( j=n)
Partie II :
2) somme s
3) fin somme
Partie II:
1) * Analyse du p.p :
Nom : bac2012
Résultat= proc afficher (T,M ,n)
T,M,= proc tri ( T,M,n)
T,M,n= proc remplir (T,M,n)
T.D.N.T
Type
Tab1 = tableau [1..20] de chaines
Tab2 = tableau [1..20] de réel
T[i] T[i+1]
T[i+1] aux2
ok True
fin pour
n n-1
3) fin tri
Algo de la procédure afficher :
1) Def proc afficher ( T :tab1 ; M :tab2 ; n :entier )
2) Pour k de 1 à n faire k Entier
Si M[k] = M[k+1] alors
Ecrire ( T[k] , ' ' ' ' , T[k+1] )
Fin si
Ecrire ( T[k] )
Fin pour
3) Fin afficher