correction dctheo_prob2
2 participants
Page 1 sur 1
correction dctheo_prob2
voici la solution**************************************************
*************************************************************
program boum;
uses wincrt;
var
n,max:integer;
procedure saisi_n(var n:integer);
begin
repeat
writeln('n=');
readln(n);
until n in [2..9];
end;
procedure saisi_max(var m:integer);
begin
repeat
writeln('max=');
readln(max);
until max in [10..99];
end;
procedure affiche (var n,max:integer );
var
i:integer;
begin
for i:= 1to max do
begin
if (i div 10 = n) or (i mod 10 =n) or (i mod n =0) then
writeln('boum')
else
writeln(i);
end;
end;
begin
saisi_n(n);
saisi_max(max);
affiche(n,max);
end.
***********************************************
*************************************************************
program boum;
uses wincrt;
var
n,max:integer;
procedure saisi_n(var n:integer);
begin
repeat
writeln('n=');
readln(n);
until n in [2..9];
end;
procedure saisi_max(var m:integer);
begin
repeat
writeln('max=');
readln(max);
until max in [10..99];
end;
procedure affiche (var n,max:integer );
var
i:integer;
begin
for i:= 1to max do
begin
if (i div 10 = n) or (i mod 10 =n) or (i mod n =0) then
writeln('boum')
else
writeln(i);
end;
end;
begin
saisi_n(n);
saisi_max(max);
affiche(n,max);
end.
***********************************************
abdellaoui- Prof
- Messages : 22
Date d'inscription : 30/11/2009
Re: correction dctheo_prob2
thinks trés gentil
Amoura ben Mabrouk- Nouveau Elève
- Messages : 7
Date d'inscription : 12/10/2009
Sujets similaires
» correction dcprat2
» correction dctheo_prob1
» correction serie
» correction pratique 1 programmation
» correction theorique 1 programmation
» correction dctheo_prob1
» correction serie
» correction pratique 1 programmation
» correction theorique 1 programmation
Page 1 sur 1
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum