with Ada.Text_Io, Ada.Integer_Text_Io;
use Ada.Text_Io, Ada.Integer_Text_Io;
procedure Ex02 is
N : Natural;
X : Natural;
Cpt : Natural;
Tmp : Natural;
begin
--- Début algo ---
Get(N); Get(X);
Cpt := 0;
for I in 1..N loop
Get(Tmp);
if Tmp = X then
Cpt := Cpt + 1;
end if;
end loop;
--- Fin algo ---
Put(X, 1); Put(" a été tapé "); Put(Cpt, 1); Put(" fois");
end;