refined last details,
finally wrote sth in the readme
This commit is contained in:
parent
d3fe16ed86
commit
10ffa53ae5
2 changed files with 33 additions and 11 deletions
|
@ -0,0 +1,8 @@
|
|||
> This is the exercise we have to do for our Ada 2nd semester exam:
|
||||
|
||||
|
||||
- Both Tds a r=separated by a comment with their names
|
||||
- I did all of the question of exercise 2 in order
|
||||
- I did the paper question of exercise 3 then the rest of the question (except the optionnal one on strings)
|
||||
- the elvish sentence means "One Ring to rule them all, One Ring to find them, One Ring to bring them all, and in the darkness bind them" I thought it was totally appropriate
|
||||
- the INSA logo is from the 1st semester Test :)
|
|
@ -1,3 +1,5 @@
|
|||
-- shall we play a game?
|
||||
|
||||
with Fiche_Plongee, Capteurs, Gada.Text_IO;
|
||||
use Fiche_Plongee, Capteurs, Gada.Text_IO;
|
||||
|
||||
|
@ -20,6 +22,9 @@ procedure td is
|
|||
end Effectif_Palanquee;
|
||||
|
||||
|
||||
-- Wake up Neo
|
||||
|
||||
|
||||
function Effectif_Fiche(Table: T_Fiche_Secu) return integer is
|
||||
I : Integer := 0; -- to go through the table
|
||||
J : Integer := 0; -- to go through the table
|
||||
|
@ -37,6 +42,8 @@ procedure td is
|
|||
return Counter;
|
||||
end Effectif_Fiche;
|
||||
|
||||
-- the matrix has you
|
||||
|
||||
function Est_Plongee_Technique(Palanq : T_Palanq) return Boolean is
|
||||
I : Integer := 1; -- to go through the table
|
||||
Teacher : Integer := 0; -- to store the number of teachers
|
||||
|
@ -57,6 +64,7 @@ procedure td is
|
|||
return (Teacher = 1 and Other = 0 and (Student > 0 and Student <5)); -- we return the value taken by the condition
|
||||
end Est_Plongee_Technique;
|
||||
|
||||
-- follow the white rabbit
|
||||
|
||||
function Numero_Premiere_Technique(Fiche : T_Fiche_Secu) return Integer is
|
||||
I : Integer := 1; -- to go through the table
|
||||
|
@ -71,6 +79,8 @@ procedure td is
|
|||
return I;
|
||||
end Numero_Premiere_Technique;
|
||||
|
||||
-- the two that are one will become the one that is all
|
||||
|
||||
function Durees_Fiche_OK(Fiche: T_Fiche_Secu) return Boolean is
|
||||
I : Integer := 1; -- to go through the table
|
||||
Good : Boolean := True; -- if it stays good all along then it's good else it's not
|
||||
|
@ -83,6 +93,7 @@ procedure td is
|
|||
return Good;
|
||||
end Durees_Fiche_OK;
|
||||
|
||||
-- Do you know Twitch Prime?
|
||||
|
||||
function Profondeur_Max(Table: T_palanq) return Integer is
|
||||
I : Integer := 0; -- to go through the table
|
||||
|
@ -99,6 +110,8 @@ procedure td is
|
|||
|
||||
end Profondeur_Max;
|
||||
|
||||
--Ash nazg durbatulûk, ash nazg gimbatul, ash nazg thrakatulûk, agh burzum-ishi krimpatul
|
||||
|
||||
function Profondeur_Fiche_OK(Fiche: T_Fiche_Secu) return Boolean is
|
||||
I : Integer := 1; -- to go through the table
|
||||
Good : Boolean := True; -- to be returned
|
||||
|
@ -142,6 +155,8 @@ procedure td is
|
|||
-- (Nord,2,32481.8)
|
||||
-- (Nord,1,32483.8)
|
||||
|
||||
-- where we go we don't need roads
|
||||
|
||||
|
||||
procedure Course is
|
||||
Temp: Float := 0.0; -- there to store a value
|
||||
|
@ -214,6 +229,8 @@ procedure td is
|
|||
end loop;
|
||||
end loop;
|
||||
|
||||
|
||||
--we then print out the lines
|
||||
for I in 1 .. NB_Swimmer loop
|
||||
J := 0;
|
||||
while (Arrival(I) /= TableTime(J,3)) loop
|
||||
|
@ -225,17 +242,14 @@ procedure td is
|
|||
|
||||
end Course;
|
||||
|
||||
|
||||
-- It is the nature of human kind to push itself towards the horyzon, we test our limits, we face our fears, we rise to the challenge, and become something greater than ourselves, a civilization.
|
||||
|
||||
|
||||
|
||||
begin
|
||||
Put_Line("42");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- As we do not have usable numerical data I did not do numerical testes :/
|
||||
|
||||
end td;
|
||||
|
||||
|
|
Loading…
Reference in a new issue