Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,34 @@
PROCEDURE Main()
LOCAL y, m, d, nFound, cNames, nTot := 0, nNotFives := 0
LOCAL aFounds := {}
SET DATE ANSI
FOR y := 1900 TO 2100
nFound := 0 ; cNames := ""
FOR m := 1 TO 12
d := CtoD( hb_NtoS( y ) +"/" + hb_NtoS( m ) + "/1" )
IF CDoW( d ) == "Friday"
IF DaysInMonth( m ) == 31
nFound++
cNames += CMonth( d ) + " "
ENDIF
ENDIF
NEXT
IF nFound > 0
AAdd( aFounds, hb_NtoS( y ) + " : " + hb_NtoS( nFound ) + " ( " + Rtrim( cNames ) + " )" )
nTot += nFound
ELSE
nNotFives++
ENDIF
NEXT
? "Total months with five weekends: " + hb_NtoS( nTot )
? "(see bellow the first and last five years/months with five weekends)"
?
AEval( aFounds, { | e, n | Iif( n < 6, Qout( e ), NIL ) } )
Qout("...")
AEval( aFounds, { | e, n | Iif( n > Len(aFounds)-5, Qout( e ), NIL ) } )
?
? "Years with no five weekends months: " + hb_NtoS( nNotFives )
RETURN