Skip to content
Extraits de code Groupes Projets
Valider 7ff58e00 rédigé par Edouard Paris's avatar Edouard Paris
Parcourir les fichiers

Init Makefile and dependancy

parent 3c2c3de2
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
bin/ bin/
*.cmi
*.cmo
all:
ocamlc -c polynome.ml
ocamlc -c main.ml
ocamlc -o bin/main nums.cma polynome.cmo main.cmo
clean:
rm -f *.cm[iox] *~ .*~ #*#
rm -f bin/main
(*projet AP Edouard Paris 2016*)
open Polynome;;
(*Projet AP Edouard Paris 2016*)
open Big_int;;
module type Polynomes =
sig
type polynome
val print_pol: polynome -> string
end
;;
module Polynome : Polynomes =
struct
type polynome =
|Null
|NotNull of big_int*int*polynome
let rec print_pol p = match p with
|Null -> "0"
|NotNull (coeff, degree, polynome)->
(string_of_big_int coeff)^"X^"^(string_of_int degree)^"+"^(print_pol polynome)
end
;;
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter