0

Help please? It's Pascal language in French ? I don't understand but I want to know how it works please help me

Algorithme exo_1 Variables V : Tableau (1...50] de RĂ©el n, i, cp : entier DĂ©but Ecrire ('Donner la taille du vecteur V:') Lire (n) Ecrire ('Donner les valeurs du vecteur V:') Pour i:=1 Ă  n faire Lire (v[i]) Fin-Pour cp ‱ 0 Pour i:=1 Ă  n faire Si v[i] > 0 alors cp ‱ cp + 1 Fin-Si Fin-Pour Ecrire (cp) Fin

24th May 2020, 10:23 PM
Bouaoun Ahmed
Bouaoun Ahmed - avatar
2 Answers
+ 2
So its program that fill an array of integers and show the number of positive values in the array . First, Lire(n) read an integer value for the array size from the user. Second, "Pour" takes i as counter and loop through all the array indexes and read its value from user input. Last, another" Pour" loop through the array and check if the value positive it adds 1 to cp .So cp at the end will contains the number of positive values . W kach ma khassak wla mafhmtch ani hna. GoodLuck
26th May 2020, 8:22 AM
Aymen GH
Aymen GH - avatar
0
I want the program in English language
26th May 2020, 10:11 AM
Bouaoun Ahmed
Bouaoun Ahmed - avatar