Skip to content

Prolog description of the relationship between a number and its full Russian name.

Notifications You must be signed in to change notification settings

jocap/russian-numbers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

The Prolog file num.pl provides a way to get from 198374628243618 to

сто девяносто восемь биллионов триста семьдесят четыре миллиарда шестьсот двадцать восемь миллионов двести сорок три тысячи шестьсот восемнадцать

– that is, it describes the relationship between a number and its Russian name.

Note: At the moment, there is a bug in the code, which makes the program handle the number two thousand (две тысячи) incorrectly.

Usage

Consult [num] and use the number_write(N) predicate to write to the prompt the Russian name of any integer N (0 < N < 10^36).

?- [num].
true.

?- number_write(1).
один 
true.

?- number_write(12).
двенадцать 
true.

?- number_write(47).
сорок семь 
true.

?- number_write(288).
двести восемьдесят восемь 
true.

?- number_write(2002001).
два миллиона два тысячи один 
true.

About

Prolog description of the relationship between a number and its full Russian name.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages