Académique Documents
Professionnel Documents
Culture Documents
: NESMY PIERRE.
CODE : PI193321
FACULTÉ : FSGA
Exercice 1
— Réaliser un tableau contenant un tableau de nom et prénom
— L’ algorithme doit afficher le nom et le prénom de chaque personne séparés par
un tiret "-"
— Voici les personnes à insérer
— Richard Louis
— Marcelin Gilbert
— Cadet Kylo
ALGORITHME affichenoms
type Tind
nom : chaine
prenom : chaine
fin type
var
TabInd[3] : tableau de Tind
name, firstname, noms : chaine
DEBUT
i:=1;
name:=TabInd[i].nom;
firstname:=TabInd[i].prenom;
POUR i de 1 A 3
AFFICHER("nom ?");
à_la_ligne;
SAISIR(name);
à_la_ligne;
AFFICHER("prenom ?");
à_la_ligne;
SAISIR(firstname);
à_la_ligne;
FIN POUR
AFFICHER("Richard Louis— Marcelin Gilbert— Cadet Kylo);
FIN
ALGORITHME moyenne
DEBUT
Variable m1, m2, r1, r2, c1, c2 : ENTIER
r1←4
r2←17
m1←11
m2←12
c1←12
c2←14
FIN