[Ruby] чет/нечет
Yuri Leikind
YuriLeikind at scnsoft.com
Wed Jan 29 18:38:05 MSK 2003
On Wed, 29 Jan 2003 20:17:09 +0500
vic ismakaev <viclists at mail.esoo.ru> wrote:
> Привет всем!
> Есть метод проверки целых чисел на четность/нечетность?
a = ...
if (a % 2 ) == 0
puts "чет"
else
puts "нечет"
end
;-))))
___
Best regards,
Yuri Leikind
"... 5 years from now everyone will be running free
GNU on their 200 MIPS, 64M SPARCstation-5."
Andy Tanenbaum to Linus Torvalds
in comp.lang.minix on Jan 1, 1992
http://groups.google.com/groups?lr=&selm=12615%40star.cs.vu.nl
More information about the Ruby
mailing list