.
..
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 Ex03d is
   N        : Natural;
   X        : Natural;
   Tmp      : Natural;
   Lastview : Natural;
begin
   Get(N);
   Get(X);
   
   --- Début algo ---
   Lastview := 0;
   for I in 1..N loop
      Get(Tmp);
      if Tmp = X then
         Lastview := I;
      end if;
   end loop;
   --- Fin   algo ---
   
   Put("La position du dernier "); Put(X, 1); Put(" est : ");
   Put(Lastview, 1);
end;
 
Webmaster : pierrefrancois.leon@laposte.net

Valid XHTML 1.0 Strict Valid CSS!