Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #53949

Project Euler 19.

From "Robert L." <No_spamming@noWhere_7073.org>
Newsgroups comp.lang.forth
Subject Project Euler 19.
Date 2017-01-12 05:13 +0000
Organization Aioe.org NNTP Server
Message-ID <o5738v$6ue$1@gioia.aioe.org> (permalink)

Show all headers | View raw


How many Sundays fell on the first of the month during the
twentieth century (1 Jan 1901 to 31 Dec 2000)?

Ruby:

require 'date'

Date.new(1901).upto(Date.new 2000,12,31).count{|d| d.sunday? && 1==d.mday}

 ===>
171

In Forth?

-- 
The former leader of the National Front Jean-Marie Le Pen was fined 30,000
euros for exposing the Jews' Holocaust gas chamber hoax.
infostormer.com/jean-marie-le-pen-fined-30000-euros-for-exposing-jewish-holocaust-gas-chamber-hoax

Back to comp.lang.forth | Previous | Next | Find similar | Unroll thread


Thread

Project Euler 19. "Robert L." <No_spamming@noWhere_7073.org> - 2017-01-12 05:13 +0000

csiph-web