diff --git a/Y/Ada-S2/Programmes/exos-preparatoires/mission2.html b/Y/Ada-S2/Programmes/exos-preparatoires/mission2.html
index d179533..574d478 100644
--- a/Y/Ada-S2/Programmes/exos-preparatoires/mission2.html
+++ b/Y/Ada-S2/Programmes/exos-preparatoires/mission2.html
@@ -1,135 +1,95 @@
-
+
mission2.adbwith Gada.Text_IO ;
-
- mission2.adb
-
-
-
-
+procedure Mission2 is
-
-
-
- with Gada.Text_IO ;
+ package Txt renames Gada.Text_IO ;
- procedure Mission2 is
-
- package Txt renames Gada.Text_IO ;
-
- type T_Intervalle is record
+ type T_Intervalle is record
Inf : Float ;
- Sup : Float ;
- end record ;
+ Sup : Float ;
+ end record ;
+
+ function Intervalle_Image(A : T_Intervalle) return String is
+ begin
+ return "[" & Integer'Image(Integer(A.Inf)) & "," & Integer'Image(Integer(A.Sup)) & "]" ;
+ end Intervalle_Image ;
- function Intervalle_Image(A : T_Intervalle) return String is
- begin
- return "[" & Integer'Image(Integer(A.Inf)) & "," & Integer'Image(Integer(A.Sup)) & "]" ;
- end Intervalle_Image ;
-
- function Est_Inclus (A : T_Intervalle ; B : T_Intervalle) return Boolean is
- begin
+ function Est_Inclus (A : T_Intervalle ; B : T_Intervalle) return Boolean is
+ begin
return A.Inf >= B.Inf and A.Sup <= B.Sup ;
- end Est_Inclus ;
+ end Est_Inclus ;
- function Disjoints (A : T_Intervalle ; B : T_Intervalle) return Boolean is
- begin
+ function Disjoints (A : T_Intervalle ; B : T_Intervalle) return Boolean is
+ begin
return A.Sup < B.Inf or A.Inf > B.Sup ;
- end Disjoints ;
+ end Disjoints ;
- procedure Afficher_Relation (A : T_Intervalle ; B : T_Intervalle) is
- begin
+ procedure Afficher_Relation (A : T_Intervalle ; B : T_Intervalle) is
+ begin
if Est_Inclus(A, B) then
- Txt.Put_Line(Intervalle_Image(A) & " est inclus dans " & Intervalle_Image(B)) ;
+ Txt.Put_Line(Intervalle_Image(A) & " est inclus dans " & Intervalle_Image(B)) ;
elsif Est_Inclus(B,A) then
- Txt.Put_Line(Intervalle_Image(B) & " est inclus dans " & Intervalle_Image(A)) ;
+ Txt.Put_Line(Intervalle_Image(B) & " est inclus dans " & Intervalle_Image(A)) ;
elsif Disjoints(A,B) then
- Txt.Put_Line(Intervalle_Image(A) & " et " & Intervalle_Image(B)
- & " sont disjoints.") ;
+ Txt.Put_Line(Intervalle_Image(A) & " et " & Intervalle_Image(B) & " sont disjoints.") ;
else
- Txt.Put_Line(Intervalle_Image(A) & " et " & Intervalle_Image(B)
- & " ne sont pas disjoints.") ;
+ Txt.Put_Line(Intervalle_Image(A) & " et " & Intervalle_Image(B) & " ne sont pas disjoints.") ;
end if ;
- end Afficher_Relation ;
+ end Afficher_Relation ;
- type T_Prod is record
+ type T_Prod is record
Gauche : T_Intervalle ;
Droite : T_Intervalle ;
- end record ;
+ end record ;
+
+ function Prod_Image(A : T_Prod) return String is
+ begin
+ return Intervalle_Image(A.Gauche) & " x " & Intervalle_Image(A.Droite) ;
+ end Prod_Image ;
+
+
+ function Prod_Est_Inclus (A : T_Prod ; B : T_Prod) return Boolean is
+ begin
+ return Est_Inclus (A.Gauche, B.Gauche) and Est_Inclus(A.Droite, B.Droite) ;
+ end Prod_Est_Inclus ;
- function Prod_Image(A : T_Prod) return String is
- begin
- return Intervalle_Image(A.Gauche) & " x " & Intervalle_Image(A.Droite) ;
- end Prod_Image ;
+ function Prod_Disjoints (A : T_Prod ; B : T_Prod) return Boolean is
+ begin
+ return Disjoints(A.Gauche, B.Gauche) or Disjoints(A.Droite, B.Droite) ;
+ end Prod_Disjoints ;
-
- function Prod_Est_Inclus (A : T_Prod ; B : T_Prod) return Boolean is
- begin
- return Est_Inclus (A.Gauche, B.Gauche) and Est_Inclus(A.Droite, B.Droite) ;
- end Prod_Est_Inclus ;
-
- function Prod_Disjoints (A : T_Prod ; B : T_Prod) return Boolean is
- begin
- return Disjoints(A.Gauche, B.Gauche) or Disjoints(A.Droite,
- B.Droite) ;
- end Prod_Disjoints ;
-
- procedure Prod_Afficher_Relation (A : T_Prod ; B : T_Prod) is
- begin
+ procedure Prod_Afficher_Relation (A : T_Prod ; B : T_Prod) is
+ begin
if Prod_Est_Inclus(A, B) then
- Txt.Put_Line(Prod_Image(A) & " est inclus dans " & Prod_Image(B)) ;
+ Txt.Put_Line(Prod_Image(A) & " est inclus dans " & Prod_Image(B)) ;
elsif Prod_Est_Inclus(B,A) then
- Txt.Put_Line(Prod_Image(B) & " est inclus dans " & Prod_Image(A)) ;
+ Txt.Put_Line(Prod_Image(B) & " est inclus dans " & Prod_Image(A)) ;
elsif Prod_Disjoints(A,B) then
- Txt.Put_Line(Prod_Image(A) & " et " & Prod_Image(B) & " sont disjoints.") ;
+ Txt.Put_Line(Prod_Image(A) & " et " & Prod_Image(B) & " sont disjoints.") ;
else
- Txt.Put_Line(Prod_Image(A) & " et " & Prod_Image(B) & " ne sont pas disjoints.") ;
+ Txt.Put_Line(Prod_Image(A) & " et " & Prod_Image(B) & " ne sont pas disjoints.") ;
end if ;
- end Prod_Afficher_Relation ;
+ end Prod_Afficher_Relation ;
- C : constant T_Intervalle := (5.0, 10.0) ;
- D : constant T_Intervalle := (7.0, 8.0) ;
- E : constant T_Intervalle := (4.0, 6.0) ;
+ C : constant T_Intervalle := (5.0, 10.0) ;
+ D : constant T_Intervalle := (7.0, 8.0) ;
+ E : constant T_Intervalle := (4.0, 6.0) ;
- begin
+begin
Afficher_Relation(C,D) ;
Afficher_Relation(D,C) ;
Afficher_Relation(C,E) ;
Afficher_Relation(D,E) ;
- Prod_Afficher_Relation((C, C), (D, D)) ;
+ Prod_Afficher_Relation((C, C), (D, D)) ;
Prod_Afficher_Relation((C, D), (D, C)) ;
Prod_Afficher_Relation((D, C), (E, C)) ;
- end Mission2 ;
-
-
-
-
-
-
+end Mission2 ;
+
\ No newline at end of file
diff --git a/Y/ystyle.css b/Y/ystyle.css
index 20c28d8..7e877da 100644
--- a/Y/ystyle.css
+++ b/Y/ystyle.css
@@ -71,6 +71,7 @@ body:before {
main {
min-height: calc(100vh - 420px);
margin-bottom: 100px;
+ display: block;
}
.yfold:not(.card) {
@@ -210,21 +211,30 @@ footer .pcom a {
/* PAGE DE CODE */
code {
- background: #1b1b1b;
- max-width: 900px;
- width: auto;
+ z-index: 2;
+ background: #000;
+ width: min(94vw, 900px);
border-radius: 12px;
margin-left: 3vw;
+ margin-top: 20px;
font-family: monospace;
- display: block;
- color: #f5d67b;
+ display: inline-block;
+ color: #ffffcc;
- tab-size: 2px;
+ tab-size: 2;
white-space: pre;
overflow-x: scroll;
- padding: 15px 20px 12px 22px;
- line-height: 1.75;
+ font-size: 120%;
+ padding: 20px 50px 22px 15px;
+ border-bottom: 10px solid #222;
+ line-height: 1.55;
+}
+
+code * {
+ white-space: pre;
+ tab-size: 2px;
+ display: inline;
}
span.comment {