update ocaml file
This commit is contained in:
@@ -24,4 +24,23 @@ let ctc x =
|
||||
else invalid_arg"somme pas egale a 9"
|
||||
else invalid_arg"3 non pairs";;
|
||||
|
||||
ctc 2025;;
|
||||
|
||||
let day d m y =
|
||||
if m=1||m=3||m=5||m=7||m=8||m=10||m=12 then
|
||||
if d>1 && d<31 then
|
||||
d,m,y
|
||||
else failwith ""
|
||||
else if m=2 then
|
||||
if d>1 && d<28 then
|
||||
d,m,y
|
||||
else failwith ""
|
||||
else if m=4||m=6||m=9||m=10 then
|
||||
if d>1 && d<30 then
|
||||
d,m,y
|
||||
else
|
||||
failwith ""
|
||||
else failwith "";;
|
||||
|
||||
|
||||
|
||||
day 12 9 2024;;
|
||||
|
||||
Reference in New Issue
Block a user