Linked Questions
13 questions linked to/from Is it a leap year?
0
votes
0
answers
105
views
Is it a leap year? Use only assignments and arithmetic expressions [duplicate]
Write a program that outputs 1 when the year is a leap year, otherwise 0. You can use any programming language, but use only assignments and arithmetic expressions for the calculation.
The Gregorian ...
549
votes
240
answers
132k
views
Showcase of Languages
Notes
This thread is open and unlocked only because the community decided to make an exception. Please do not use this question as evidence that you can ask similar questions here. Please do not ...
77
votes
94
answers
16k
views
Golf all the 16 logic gates with 2 inputs and 1 output!
For example, the gate A and B is a logic gate with 2 inputs and 1 output.
There are exactly 16 of them, because:
each logic gate takes two inputs, which can be ...
20
votes
110
answers
3k
views
Print last inputted byte
Challenge
You have one string of input bytes, output only the last byte in it.
Rules
Your submission may be a program or function outputting the last byte in the input which
is either a string, stdin ...
52
votes
33
answers
6k
views
Encode the date in Christmas Eve format
The day this post was published was Christmas Eve. Tomorrow will be Christmas. Yesterday was Christmas Eve Eve. In two days it will be
...
23
votes
38
answers
5k
views
What year will it be in n seconds?
You are given an integer n as input, and, regardless of the current date, must return the calendar year (Gregorian calendar, other calendars not allowed) taking ...
19
votes
25
answers
5k
views
The Work Day Countdown
I just had a genius idea for making the work-life easier - a countdown to a specific date which only counts workdays.
The basic task is to create a countdown to a specific date which only includes ...
46
votes
11
answers
2k
views
Run Stackylogic
Stackylogic is a logic-based programming language I made up that take in 0's and 1's for input and outputs a single ...
11
votes
7
answers
1k
views
Calculate the day number of the year
Seems like we do not have this one yet, so here we go:
The Challenge
Write a program or function that takes a date as input and outputs the day number of the year. You may not use any builtins for ...
10
votes
7
answers
326
views
Days and months make years
Today's date is quite an interesting one. Let's take a look at why. The date 07/12/2017 (in DD/MM/YYYY date format) can be split ...
12
votes
6
answers
479
views
Implement OADD_MONTHS
Introduction
A function that adds months to a date (without overflowing ends of months) is implemented in many languages/packages. In Teradata SQL it's ADD_MONTHS, here are some examples:
...
8
votes
4
answers
535
views
Find the date that is n days from January 1st 1984
This challenge is a relatively simple concept that I'm surprised has not been done yet. You will be given only an integer as an input. Your task is to find the date that is this number of days from ...
0
votes
9
answers
629
views
Year progress bar
Create a progress bar indicating year progress
Your code has to output the percentage of the year already passed form 1st of January of the current year.
You have to display a progress bar and the ...