One day I came across a newly learned programmer. I asked him to show his programming skill by writing the program that shows the day of the week when date is provided. So he started the coding with…
 
if (date = 6 or date = 13 or day = 20 or day =27 ) then
weekday= “Monday”
 

if (date = 7 or date = 14 or day = 21 or day =28 ) then
weekday= “Tuesday”
 

if (date = 8 or date = 15 or day = 22 or day =29 ) then
weekday= “Wednesday”
 
:
:
…and he continued
 
Then I asked him that what did he think of his own code, whether it will work for every month???
He said I will just edit it every month….
Hearing this my 32 teeth’s started showing off. Oh sorry I have one less.
Advertisements