Language OCaml
(historic version)
| Date: | 04/20/05 |
| Author: | Philipp Winterberg |
| URL: | http://www.winterbergs.de/ |
| Comments: | 0 |
| Info: | http://caml.inria.fr/ocaml/distrib.html |
| Score: |
(* Objective Caml version of 99 Bottles of beer (Bottles.ml) *)
(* http://caml.inria.fr/ocaml/distrib.html *)
(* Philipp Winterberg, http://www.winterbergs.de *)
let b = ref 99
in while !b > 0 do
print_int !b; print_string " bottle(s) of beer on the wall,\n";
print_int !b; print_string " bottle(s) of beer.\n";
print_string "Take one down, pass it around,\n";
b := !b - 1;
print_int !b; print_string " bottle(s) of beer on the wall.\n\n"
done;;
Download Source | Write Comment
Alternative Versions
| Version | Author | Date | Comments | Rate |
|---|---|---|---|---|
| functional version | Anonymous | 04/20/05 | 0 | |
| version with recursive variant type | Pierre Etchemaïté | 11/18/05 | 1 | |
| A little modification to the current one | Philippe Wang | 01/28/06 | 1 | |
| working with new versions, using printf | David Baelde | 11/08/05 | 0 |
Download Source | Write Comment
Add Comment
Please provide a value for the fields Name,
Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.
Please don't post large portions of code here! Use the form to submit new examples or updates instead!
Comments