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 39 40 41 42 43 44
| program fiche;
uses crt, dos;
var f : text;
nom : string;
prenom : string;
ville : string;
postal : longint;
email : string;
tel : longint;
choix : char;
procedure lecture;
begin
reset(f);
writeln(nom);
writeln(prenom);
writeln(ville);
writeln(postal);
writeln(tel);
end;
begin
clrscr;
assign (f, 'fiche.txt');
rewrite(f);
write('Entrez votre nom : ');
readln(nom);
write('Entrez votre prenom : ');
readln(prenom);
write('Entrez le nom de votre ville : ');
readln(ville);
write('Entrez votre code postal : ');
readln(postal);
write('Entrez votre numero de telephone : ');
readln(tel);
writeln(f, nom);
writeln(f, prenom);
writeln(f, ville);
writeln(f,postal);
writeln(f, tel);
close(f);
write('Voulez vous lire votre fiche de renseignement ? [O/N]');
readln(choix);
if (choix='o') or (choix='O') then lecture ;
readln;
end. |
Partager