0% found this document useful (0 votes)
18 views

Program CalMot

nkjjoi oij oij oi o ojoijo

Uploaded by

Morgsi Mohamed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Program CalMot

nkjjoi oij oij oi o ojoijo

Uploaded by

Morgsi Mohamed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

‫الخوارزميات حساب عدد كلمات فقرة‬

Algoritme CalMots;
Var i,n,cpt:integer; ch: string[20] ;

Debut
ecrire('Entrez la chaine ');
lire (ch);
i1; cpt 0 ; n10 ;
tant que i<=20 faire
debut
si ch[i]<>' alors
debut
cptcpt+1 ;
tant que (i<=20) et (ch[i]<>' ') faire
ii+1 ;
fin tantque ;
ii+1 ;
fintantque ;
ecrire('le nombre de mot ',cpt);

end.
:‫ صفوف و عمودين ثم اظهار المصفوفة‬3 ‫الخوارزميات ادخال قيم في مصفوفة ذات‬

Algoritme matrice;
var tableau mat(3, 2): real;
n,m,i,j:integer;
debut
Ecrire('entrer la taille de la mat:');
lire(n,m);

Ecrire('Donner les composants de la mat:');


pour i1 to n faire
pour j1 to m faire
lire(mat[i,j]);
ecrire('affichage de La matrice :');
pour i1 to n faire
j1;
pour j1 to m faire
ecrire (mat[i,j]:10:2);
fait;
fait;
end.
‫تصحيح اختبار باسكال التمرين االول‬
program CalMot;
Var i,n,cpt:integer; ch: string[20] ;
BEGIN
Writeln('ecrire chaine ');
Readln(ch);
i:=1; cpt:=0; n:=10 ;
while i<=20 do
begin
if ch[i]<>' ' then
begin
cpt:=cpt+1 ;
while (i<=20) and (ch[i]<>' ') do
i:=i+1 ;
end ;
i:=i+1 ;
end ;
writeln('le nombre de mot ',cpt);
readln();
end.
‫تصحيح اختبار باسكال التمرين الثاني‬
program matrice;
var A:array[1..3, 1..2] of real;
n,m,i,j:integer;
begin
writeln('entrer la taille de la mat:');
read(n,m);
writeln('Donner les composants de la mat:');
for i:=1 to n do
for j:=1 to m do
read(A[i,j]);
writeln('affichage de La matrice :');
for i:=1 to n do
begin
j:=1;
for j:=1 to m do
begin
write(A[i,j]:10:2);
end; writeln(); readln() ;
end;
end.

You might also like