Académique Documents
Professionnel Documents
Culture Documents
0014 - Sous-Programmes (Partie 3 - Fonctions)
0014 - Sous-Programmes (Partie 3 - Fonctions)
PARTIE 3 : FONCTION
- Introduction
- Notion d’un sous programme
- Déclaration, Appel, Paramètres …
- Procédures : déclaration et appel
- Fonctions : déclaration et appel
- Paramètres formelles et effectifs.
- Passage/Transmission de paramètres
Programme
principal
Données Fonction
- n, k, c, nf, kf, nkf factoriel
Données
Instructions i= 234/ , n= / 4, f= / 24
6120
…. Instructions
n=4
f := 1;
nf := factoriel(n);
for i:=2 to n do
.. Fact
o riel = f := f * i;
24
nf = 24 factoriel := f