Update all new Tasks

This commit is contained in:
Ingy döt Net 2015-02-20 09:02:09 -05:00
parent 00a190b0a6
commit 91df62d461
5697 changed files with 93386 additions and 804 deletions

29
Task/Nth/Seed7/nth.seed7 Normal file
View file

@ -0,0 +1,29 @@
$ include "seed7_05.s7i";
const func string: suffix (in integer: num) is func
result
var string: suffix is "";
begin
if num rem 10 = 1 and num rem 100 <> 11 then suffix := "st";
elsif num rem 10 = 2 and num rem 100 <> 12 then suffix := "nd";
elsif num rem 10 = 3 and num rem 100 <> 13 then suffix := "rd";
else suffix := "th";
end if;
end func;
const proc: printImages (in integer: start, in integer: stop) is func
local
var integer: num is 0;
begin
for num range start to stop do
write(num <& suffix(num) <& " ");
end for;
writeln;
end func;
const proc: main is func
begin
printImages( 0, 25);
printImages( 250, 265);
printImages(1000, 1025);
end func;