print_int : int -> unit
print_string : string -> unit
print_endline : string -> unit
print_newline : unit -> unit
String.length : string -> int
String.create : int -> string
init_tas : int*string -> unit
/mod
n p
n p
chiffre_unite
#chiffre_unite (1234) ;;
-:int=4
#chiffre_unite (20) ;;
-:int=0
#chiffre_unite (5) ;;
-:int=5
1 + 2 = 3 3
1 + 3 = 4 4
123 456
123 456 1+2+3+4+5+6=212 + 1 = 3,
3 123 456 999 999 998
999 999 998 8×9 + 8 = 80 8,
8 999 999 998
n
let sc (n) =
let s = ref 0
and n1 = ref n
in
while !n1 > 9 do
s := !s + chiffre_unite(!n1);
n1 := !n1 / 10
done ;
!s + !n1 ;;
s n1
sc n=12345
est_divisible_par_trois true
false
#est_divisible_par_trois (12) ;;
- : bool = true
#est_divisible_par_trois (13) ;;
- : bool = false
#est_divisible_par_trois (123456) ;;
- : bool = true
est_divisible_par_trois
100 n’est pas divisible par 3.
101 n’est pas divisible par 3.
102 est divisible par 3.
...
199 n’est pas divisible par 3.
200 n’est pas divisible par 3.
crochete
s
s crochete("timoleon") "[t][i][m][o][l][e][o][n]"
crochete
encadre c
c
crochete
decrochete crochete
s
decrochete(crochete(s))=s
1 / 3 100%
La catégorie de ce document est-elle correcte?
Merci pour votre participation!

Faire une suggestion

Avez-vous trouvé des erreurs dans linterface ou les textes ? Ou savez-vous comment améliorer linterface utilisateur de StudyLib ? Nhésitez pas à envoyer vos suggestions. Cest très important pour nous !