Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Code Block
languagevb
function year = maxFridays13()
year = 0;
top = 0;
pos = 1;
for i = 1900:2015
    temp = sum(monthsWithFriday13(i) );
    if temp > top
        year = i;
        top = temp;
        pos = 1;
    elseif temp == top
        pos = pos + 1;
        year(pos) = i;
    end
end
end