Warning, /education/kalzium/src/solver/main.ml is written in an unsupported language. File is not indexed.

0001 (*
0002     SPDX-FileCopyrightText: 2004 Thomas Nagy <tnagy2^8@yahoo.fr>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 *)
0006 
0007 open Printf;;
0008 open Calc;;
0009 
0010 
0011 let myeq1 = " a CH3(CH2)3COOH + b O2 -> c H2O + d CO2";;
0012 let myeq2 = " a CH3COOH + b O2 -> c H2O + d CO2";;
0013 let myeq3 = " a CH3(CH2)3COOH + b O2 -> invalid equation ";;
0014 let myeq4 = "2CH4+aC2H6+cO2->eH2O+5CO2";;
0015 let myeq5 = "a NaNO2 + b NH3 -> b NaN3 + e NaNO3";;
0016 let myeq6 = "a HNO2 + b NH3 -> b HN3 + e HNO3";;
0017 let myeq7 = "a H3O[+] + dCO2 + eO2 -> fH2O + dCO3[2+]";;
0018 
0019 (* Printf.printf "%s \n" (solve_equation myeq1);;
0020 Printf.printf "%s \n" (solve_equation myeq2);;
0021 Printf.printf "%s \n" (solve_equation myeq3);; *)
0022 (*
0023 Printf.printf "%s \n" (solve_equation myeq5);;
0024 Printf.printf "%s \n" (solve_equation myeq6);;
0025 Printf.printf "%s \n" (solve_equation myeq6);;
0026 
0027 Printf.printf "%s \n" (solve_equation myeq6);;*)
0028 Printf.printf "%s \n" (solve_equation myeq7);;