How to resolve the algorithm Calendar step by step in the Befunge programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Calendar step by step in the Befunge programming language

Table of Contents

Problem Statement

Create a routine that will generate a text calendar for any year.
Test the calendar by generating a calendar for the year 1969, on a device of the time. Choose one of the following devices:

(Ideally, the program will generate well-formatted calendars for any page width from 20 characters up.) Kudos (κῦδος) for routines that also transition from Julian to Gregorian calendar. This task is inspired by Real Programmers Don't Use PASCAL by Ed Post, Datamation, volume 29 number 7, July 1983. For further Kudos see task CALENDAR, where all code is to be in UPPERCASE. For economy of size, do not actually include Snoopy generation in either the code or the output, instead just output a place-holder.

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Calendar step by step in the Befunge programming language

Source code in the befunge programming language

"P"00p&>:::4%!\"d"%*\45*:*%!+!!65*+31p:1-:::"I"5**\4/+\"d"/-\45*:*/+1+7%:0v
J!F?M!A M!J J!A!S O!N D!SaFrThWeTuMoSuvp01:_1#!-#%:#\>#+6
 January  February  March    April    >:45**00g\-\1-:v:<<6>+7%:10g2+:38*\`|
   May      June     July    August v02-1:+4*-4\`\4:/_$:^^:/*2+92+2:g00$$$<
September October  November December>p:45*+10g*\--2/00g4-2/>:#,1#*-#8\#4_$v
>20g>:#,1#*-#8\#4_$6"$S" v. .vp040\$_4#!8#\*#-,#1>#:<+5g03g01:,,:+55<0.p03<
^_v#:-1$_v#!:,*84,g1+1,< < ^ >::4%9*40g:8`!#v_$$$1+v^+g02_#v$#,$#+5<^_v#`\<
-#8\#4_$7>1-:2*64*+:1g>^ ^   ^,g+2/4\+p04+1:<>1#\-#<:66+\^ >>$10g30g>:#,1#*
> > $$55+,6>>40p:10g30g>:#,1#*-#8\#4_$>\:2*:1+1g2-50p1g640g-7*1+\-7v  v@,<6
2:+g01$_55+,^ > > > > #^>#g>#0>#2_v v*2!!\%+55:\/+55:**`0\!`g05:::\<  >2-^^
->:> >#^>#<>#<^#!:-1g04$$ < < < < < >4+8*+\:!!2*4+8*+,,48*,1+\1-:>#^_$$1+\1


  

You may also check:How to resolve the algorithm Verify distribution uniformity/Naive step by step in the PARI/GP programming language
You may also check:How to resolve the algorithm Primorial numbers step by step in the CLU programming language
You may also check:How to resolve the algorithm Factorial step by step in the MIPS Assembly programming language
You may also check:How to resolve the algorithm String comparison step by step in the MiniScript programming language
You may also check:How to resolve the algorithm Function composition step by step in the WDTE programming language