Linked Questions

0
votes
0answers
94 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 ...
530
votes
235answers
121k 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 ...
64
votes
84answers
14k 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 ...
17
votes
95answers
3k views

Print last inputted byte

Challenge You have one string of input bytes, output 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 or ...
21
votes
35answers
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
25answers
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 ...
45
votes
11answers
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 ...
12
votes
7answers
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
7answers
297 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 ...
8
votes
4answers
497 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 ...
1
vote
9answers
539 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 ...