.
..
ex01a.adb (download) (view)
ex01b.adb (download) (view)
ex02.adb (download) (view)
ex03a.adb (download) (view)
ex03b.adb (download) (view)
ex03c.adb (download) (view)
ex03d.adb (download) (view)

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;
 
Webmaster : pierrefrancois.leon@laposte.net

Valid XHTML 1.0 Strict Valid CSS!